The 'gd' RPM shipped with Redhat-5.2 does not include the
various header files which come with that library:
milliways  [~/]> rpm -qpl gd-1.3-3.i386.rpm
milliways  [~/redhat/BUILD/gd1.3/]> ls *.h
gd.h gdfontg.h gdfontl.h gdfontmb.h gdfonts.h
This means any applications which must have 'libgd' to
build won't work.
The (obvious) workaround is to grab the header files from
try installing the gd-devel rpm.