Step 1 Download NS2 from http://sourceforge.net/projects/nsnam/ (I use NS2.34)
Step 2 Modifies follow http://sites.google.com/site/pengjungwu/install-ns2-31-on-osx (only step1, step2)
Step 3 run ./configure --x-includes=/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include \\
--x-libraries=/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib in otcl-1.13, tclcl-1.19, and ns-2.32
Step 4 make otcl-1.13, tclcl-1.19, and ns-2.32
Step 5 Enjoy with NS2
Reference
http://nsnam.isi.edu/nsnam/index.php/Troubleshooting
http://sites.google.com/site/pengjungwu/install-ns2-31-on-osx