Just tried to compile PHP 5.3.6 with using the --with-libdir option. The compile process always failed because either libpng.(a|so) or libjpeg.(a|so) was not found:
# ./configure --prefix=/usr --with-libdir=/usr/lib64 --with-gd .... ... checking for FreeType 2... no checking for T1lib support... no checking whether to enable truetype string function in GD... yes checking whether to enable JIS-mapped Japanese font support in GD... no checking for fabsf... (cached) yes checking for floorf... (cached) yes If configure fails try --with-jpeg-dir=<DIR> configure: error: libpng.(a|so) not found.
But libpng.so exists:
# ls -l /usr/lib64/ | grep png lrwxrwxrwx 1 root root 10 Feb 7 11:43 libpng.a -> libpng12.a lrwxrwxrwx 1 root root 11 Feb 7 11:43 libpng.so -> libpng12.so lrwxrwxrwx 1 root root 13 Jul 17 2010 libpng.so.3 -> libpng12.so.0 -rw-r--r-- 1 root root 242636 Jul 17 2010 libpng12.a lrwxrwxrwx 1 root root 18 Feb 7 11:43 libpng12.so -> libpng12.so.0.27.0 lrwxrwxrwx 1 root root 18 Jul 17 2010 libpng12.so.0 -> libpng12.so.0.27.0 -rw-r--r-- 1 root root 153072 Jul 17 2010 libpng12.so.0.27.0
Even a configure with the option --with-png-dir=/usr/lib64 didn't work.
The solution is not to use the full path in the --with-libdir option, but only the folder name of the library folder:
# ./configure --prefix=/usr --with-libdir=lib64 --with-gd .... ... checking for FreeType 2... no checking for T1lib support... no checking whether to enable truetype string function in GD... yes checking whether to enable JIS-mapped Japanese font support in GD... no checking for fabsf... (cached) yes checking for floorf... (cached) yes If configure fails try --with-jpeg-dir=<DIR> checking for png_write_image in -lpng... (cached) yes If configure fails try --with-xpm-dir=<DIR> If configure fails try --with-freetype-dir=<DIR> checking for GNU gettext support... yes ...
Unfortunately there is nothing written about this in ./configure --help.
|