Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+
Inside the gcc directory, do this command:
./contrib/download_prerequisites
After that script, GMP, MPFR, and MPC will be ready to use. Continue with ./configure
.
I had the same problem trying to install/compile GCC 4.8.1. Here is how I solved:
In Debian, just run this two commands:
apt-get install libmpc-dev
./configure
I had the same problem compiling GCC 4.9 branch.
For Red Hat and Fedora based systems, run the following command:
sudo yum install gmp gmp-devel mpfr mpfr-devel libmpc libmpc-devel
This will install the GNU multiple-precision (MP) libraries for integer, floating point, and complex numbers.