./configure CFLAGS="-ggdb3 -O0" CXXFLAGS="-ggdb3 -O0" LDFLAGS="-ggdb3"
CXXFLAGS="-g -O2 -std=c++11"
c++0x
./configure CC="/usr/bin/gcc-4.6" CXX="/usr/bin/g++-4.6"CFLAGS="-ggdb3 -O0" CXXFLAGS="-ggdb3 -O0" LDFLAGS="-ggdb3"
CC="gcc-4.5" ./configure
CC="gcc-4.5" make
This works, but is discouraged. The recommended way to specify CC is in an argument to configure, not in the environment. In other words, you should do
"./configure CC=/path/to/desired/compiler"