First of all - a question. What have you already installed? The only gd I have is the bundled one from PHP. I don't have any gdlib-config at all. The instructions below assume there isn't any standalone gd installed on your system.
OK. Here is what you do:
1) Download the source for libgd from:
https://bitbucket.org/pierrejoye/gd-libgd/overview
2) Extract the tar ball
3) Edit the file src/configure.ac and remove the 4 lines that start with 'AM_ICONV'
4) Go into the src directory and run: "ln -s ../config config" and "ln -s ../test test"
5) Now (still in src) run "sh bootstrap.sh"
6) Now (still in src) run "autoreconf -fvi"
(Hopefully you have had no errors by this point)
7) Now (still in src) run "./configure"
On my machine, I am running 10.6.7 with Xcode3 and Xcode4 installed. In the past, I have installed a fair number of funky Perl modules. After running "./configure", my system reports:
Support for PNG library: yes
Support for JPEG library: yes
Support for Freetype 2.x library: yes
Support for Fontconfig library: yes
Support for Xpm library: yes
Support for pthreads: yes
If yours doesn't say the same thing, you may have to go back and install some prerequisites.
8) Run "make"
9) Run "sudo make install"
At this point, you have a standalone libgd installed in /usr/local. If you build all of your Perl modules, they should find that automatically. I don't know what GD they found before.