I am trying to install GCC 4.7.1 on my Mac because I want to update the LLVM GCC 4.2 given in XCode.
GCC
LLVM GCC
I have downloaded GCC 4.7
Install MacPorts and run:
$ sudo port selfupdate $ sudo port install gcc47
It will take care of correctly configuring and installing gcc (4.7.2 at the time of writing) and all dependencies.