echo "============================================================"
echo "* Build OTcl-$OTCLVER"
echo "============================================================"
cd ./otcl-$OTCLVER
blame='Please check http://www.isi.edu/nsnam/ns/ns-problems.html
for common problems and bug fixes.'
if [ "${test_cygwin}" = "true" ]; then
./configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include || die "otcl-$OTCLVER configuration failed! Exiting ...";
else
./configure --x-libraries=/Developer/SDKs/MacOSX10.5.sdk/usr/X11R6/lib --x-includes=/Developer/SDKs/MacOSX10.5.sdk/usr/X11R6/include || die "otcl-$OTCLVER configuration failed! Exiting ...";
fi
if make
then
echo "otcl-$OTCLVER has been installed successfully."
else
echo "otcl-$OTCLVER make failed! Exiting ..."
echo "See http://www.isi.edu/nsnam/ns/ns-problems.html for problems"
exit
fi
cd ..
Modification 3
echo "============================================================"
echo "* Build Tclcl-$TCLCLVER"
echo "============================================================"
cd ./tclcl-$TCLCLVER
if [ "${test_cygwin}" = "true" ]; then
./configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include || die "tclcl-$TCLCLVER configuration failed! Exiting ...";
else
./configure --x-libraries=/Developer/SDKs/MacOSX10.5.sdk/usr/X11R6/lib --x-includes=/Developer/SDKs/MacOSX10.5.sdk/usr/X11R6/include --with-otcl=../otcl-$OTCLVER || die "tclcl-$TCLCLVER configuration failed! Exiting ..."
fi
if make
then
echo "tclcl-$TCLCLVER has been installed successfully."
else
echo "tclcl-$TCLCLVER make failed! Exiting ..."
echo "See http://www.isi.edu/nsnam/ns/ns-problems.html for problems"
exit
fi
cd ../
Modification 4
echo "============================================================"
echo "* Build nam-$NAMVER"
echo "============================================================"
ln -s otcl-$OTCLVER otcl
ln -s tclcl-$TCLCLVER tclcl
cd ./nam-$NAMVER
# XXX temporary OS X hack
if [ "${test_darwin}" = "true" ]; then
ln -s /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation libcorefoundation.dylib
fi
if [ "${test_cygwin}" = "true" ]; then
./configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include --with-tclcl=$CUR_PATH/tclcl-$TCLCLVER || die "Nam configuration failed! Exiting ...";
else
./configure --with-otcl=../otcl-$OTCLVER --with-tclcl=../tclcl-$TCLCLVER --x-libraries=/Developer/SDKs/MacOSX10.5.sdk/usr/X11R6/lib --x-includes=/Developer/SDKs/MacOSX10.5.sdk/usr/X11R6/include || die "Nam configuration failed! Exiting ...";
fi
3. Install NS2
./install
4. PATH
echo "PATH=/Users/username/ns2/ns-allinone-2.31/bin:$PATH" > .bashrc