Gcc 2.95 is not supported, you'll need at least 3.0 (I think, might require a later version).
If you have 3.0 installed (and you seem to have), you can make use of it instead, by setting the right gcc/g++ applications in the CC and CXX variables. Lets say that the g++ executable is named as the gcc executable, in which case you should do the following:
export CC="gcc-3.0"
export CXX="g++-3.0"
./configure
etc.