Welcome to LQ.
Note : Be aware that gcc-core creates gcc only, no g++, c++ etc.
A build folder (objdir) outside the gcc-4.2.4/ source folder is the default method.
Then a "minimum" configure line for gcc-core can be like :
../gcc-4.2.4/configure --prefix=/usr/local/gcc42 --program-suffix=42 --enable-shared --enable-threads=posix --enable-__cxa_atexit
But why build it yourself ? gcc-4.2.3 is available in Synaptic :
> Settings > Repositories > Other Software : Hardy Heron .
... Then refresh, and install 'gcc-4.2'.
Or : gcc42-compat version 4.2.4 : sudo dpkg -i gcc42-compat-4.2.4_i386.deb
https://docs.google.com/open?id=0B7S...VlMjk4OTI5NGVk
( g++42-compat
https://docs.google.com/open?id=0B7S...FlODA4YWFiMTcx )
.