First off that long trail and error should be replaced with this:

cd ming-0.4.0.beta5
./configure

http://www.libming.net/moin.cgi/Mac_OS_X_Installation

Second you will need to install Developers Tools that is available on Disc 2 of MacOSX, install X11.app as well when you are doing this. (can’t read more need to go to bed).