When building from soruce, gd 2.0.33 requires that the following libraries also be installed, in order to produce the related image formats.
libpng (see the libpng home page)
zlib (see the info-zip home page)
jpeg-6b or later, if desired (see the Independent JPEG Group home page)
If you want to use the TrueType font support, you must also install the FreeType 2.x library, including the header files.
After these are installed install gd with
./configure
make
make install
PHP configure is
your other item as well as
--with-zlib --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-gd --with-freetype2-dir=/usr/lib