Just install the gcc-4.4
and g++-4.4
packages and make sure you call the right compiler version on the command line, e.g.
g++-4.4 [options]
Depending on the source you are trying to compile, you can usually specify the compiler in the Makefile
.
You might want to switch the default compiler on your system by telling Ubuntu this using update-alternatives
, e.g.
update-alternatives --config cc
update-alternatives --config c++
Note that this is a system-wide setting, so I would not recommend doing this unless compiling this source is the only purpose of this system.