If you downloaded ns-3.2.1.tar.bz2 it can be unpacked to
e.g. /home/username/tmp with the command 'tar xvf ns-3.2.1.tar.bz2'
and build with './waf configure --enable-gcov' and './waf'
and then just follow doc/build.txt
(you will need python and g++)
And the result of "configure" will tell you, which other "-devel"
packages to install, to have all the options.
Please also consider "ns-2.33" (or "ns-allinone-2.33)
http://www.isi.edu/nsnam/ns/
Possibly easier to use.