Rather than building all the required libraries etc. by hand, consider using Fink or MacPorts (formerly Darwin Ports) to get the required libraries etc. They're already either in binary form ready to install, or in code already configured to compile cleanly on OS X. I've installed gtk+, atk...