Figuring out how to get GD compiled caused me days of grief!!! I kept checking to see whether and of it's components were not built or installed properly. Compiling on Solaris complained about the -shared flag too interpreting it as -h ared (i think). The previous reply was a step in the right direction for me, but here are the steps I used to get it to compile:Change -shared to '-dynamic -flat_namespace -undefined suppress' in the Makefile.
make install still complains about not finding an -lgd library. You have to run these steps:
make libgd.a
cp libgd.a /usr/local/lib
ranlib /usr/local/lib/libgd.a
make install then completed correctly.
I needed GD to use the Perl GD:Graph modules and while compiling those I ran into this error:
dyld: perl Undefined symbols
_FT_New_Face
Trace/BPT trap
the solution for that was to run a make and make
install of perl 5.8.0 again.