> I am re-installing a combalt raq4 with php4.0.6/gd1.8 with png and jpeg
> support.
> libpng and libjpg are compiled succesfully but libgd refuses to use them.
>
> When i try to configure libgd i get the following messages:
>
> checking whether to include GD support... yes
> checking whether to enable truetype string function in gd... no
> checking for the location of libjpeg... no
> not set. If configure fails try --with-jpeg-dir=<DIR>

PHP did not find your libjpeg.  Specify where it is using
--with-jpeg-dir=<DIR>

> checking for the location of libpng... yes
> checking for png_info_init in -lpng... (cached) yes

Ok, good, PHP found your libpng

> checking for gdImageCreateFromPng in -lgd... (cached) no

Make sure you did a "rm config.cache" before running configure.  If you
did, then double check that your libgd was actually compiled with PNG
support.  It is not enough that libpng is on your system and that PHP
finds it, GD has to have been built against it as well.  A quick way to
check which imahge types your libgd was built to support is to do:

  nm -o /usr/lib/libgd.a | grep -i imagecreatefrom

> checking for gdImageCreateFromJpeg in -lgd... (cached) no

Again, it doesn't look like your GD library has jpeg support.

I would suggest using GD2.  It really is much better than GD 1.x in most
respects.  Grab the gd-2.0.1 tarball, expand it somewhere and check the
Makefile and make sure it has:

CFLAGS=-g -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE
LIBS=libgd.a -lpng -lz -ljpeg -lfreetype -lm

(make sure you have freetype2 installed before continuing)

then type: make libgd.a

Don't bother installing it anywhere, just point PHP directly at this gd2
directory.  I use these PHP configure switches:

--with-gd=/home/rasmus/gd-2.0.1
--with-freetype-dir=/usr
--enable-gd-native-ttf
--enable-gd-imgstrttf
--with-jpeg-dir=/usr
--with-png-dir=/usr
--with-xpm-dir=/usr/X11R6
--with-zlib

Note there was a slight buglet in 4.0.6 and you might have to use:

--enable-gd-native-tt instead of --enable-gd-native-ttf

-Rasmus


-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to