Debian Codegraph @

allinone/install

raw symbols SCIP
1 #! /bin/sh
2 #
3 # Copyright (C) 2000 by USC/ISI
4 # All rights reserved.
5 #
6 # Redistribution and use in source and binary forms are permitted
7 # provided that the above copyright notice and this paragraph are
8 # duplicated in all such forms and that any documentation, advertising
9 # materials, and other materials related to such distribution and use
10 # acknowledge that the software was developed by the University of
11 # Southern California, Information Sciences Institute. The name of the
12 # University may not be used to endorse or promote products derived from
13 # this software without specific prior written permission.
14 #
15 # THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
16 # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
17 # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18 #
19 # $Header: /cvsroot/nsnam/ns-2/allinone/install,v 1.35 2010/03/08 04:47:18 tom_henderson Exp $
20
21 die() {
22 echo "$@" 1>&2
23 test ! -z "$blame" && echo "$blame" 1>&2
24 exit 1
25 }
26
27 warn() {
28 echo "$@"
29 }
30
31 test_proceed() {
32 echo "";
33 echo "The above test indicates that your installation of Cygwin";
34 echo "is probably NOT SUITABLE for installing ns-2 allinone.";
35 echo "(More details can be found in the specific error message above.)";
36 echo "";
37 echo -n "Do you wish to proceed regardless? [y/N] "
38 read answer;
39 if [ "$answer" != "y" ] && [ "$answer" != "Y" ]; then
40 die "Installation aborted...";
41 exit 1;
42 fi;
43 echo "";
44 echo "*** OK, but you're on your own... ***";
45 echo "";
46 }
47
48 test_packages() {
49 for i in $@; do
50 echo -n "Checking for ${i}... ";
51 cygcheck -c ${i} | grep ${i} >/dev/null 2>&1;
52 if [ "$?" -eq "0" ]; then
53 echo "ok";
54 else
55 echo "NO!";
56 echo "";
57 echo "Package ${i} is not present on your system.";
58 echo "";
59 echo "Please install it using Cygwin's setup.exe";
60 echo "before trying to install the ns-2 distribution.";
61 test_proceed;
62 fi;
63 done;
64 }
65
66 cygwin_tests() {
67 echo -n "Checking Cygwin version is >= 1.7.1... "
68 cmaj=` uname -r | sed -e 's/^\([0-9]*\)\.\([0-9]*\).\([0-9]*\).*/\1/'`;
69 echo $cmaj | grep -v [0-9] >/dev/null 2>&1
70 if [ "$?" -eq "0" ]; then
71 cmaj=0;
72 fi;
73 cmin=` uname -r | sed -e 's/^\([0-9]*\)\.\([0-9]*\).\([0-9]*\).*/\2/'`;
74 echo $cmin | grep -v [0-9] >/dev/null 2>&1
75 if [ "$?" -eq "0" ]; then
76 cmin=0;
77 fi;
78 cpat=` uname -r | sed -e 's/^\([0-9]*\)\.\([0-9]*\).\([0-9]*\).*/\3/'`;
79 echo $cpat | grep -v [0-9] >/dev/null 2>&1
80 if [ "$?" -eq "0" ]; then
81 cpat=0;
82 fi;
83 echo -n "$cmaj.$cmin.$cpat ";
84 if ([ "$cmaj" -gt "1" ]) || ([ "$cmaj" -eq "1" ] && [ $cmin -gt "7" ]) || ([ "$cmaj" -eq 1 ] && [ $cmin -eq "7" ] && [ "$cpat" -ge "1" ]); then
85 echo "(should be ok)";
86 else
87 echo "(NO!)";
88 echo "";
89 echo "ns-allinone-${NSVER} has not been tested under versions of Cygwin older than";
90 echo "1.7.1. Your version ($cmaj.$cmin.$cpat) appears to be older than that. Success of";
91 echo "the install process is therefore NOT GUARANTEED.";
92 echo "";
93 cygversion="failed";
94 test_proceed;
95 fi;
96 echo -n "Checking filesystems are mounted as UNIX filetype... ";
97 mount | grep "textmode" >/dev/null 2>&1;
98 if [ "$?" -eq "0" ]; then
99 echo "NO!";
100 mount_test="failed";
101 echo "";
102 echo "It appears that some of your Cygwin shares are mounted as DOS file";
103 echo "type. This has not been tested, but is likely to result in failure of";
104 echo "validation tests. Success of the install process is also NOT";
105 echo "GUARANTEED.";
106 echo "";
107 echo "Refer to the Cygwin user guide for how to install Cygwin with the UNIX";
108 echo "file text mode.";
109 test_proceed;
110 else
111 echo "yes";
112 echo -n "Checking default mode is binmode... ";
113 echo ${CYGWIN} | grep "nobinmode" >/dev/null 2>&1;
114 if [ "$?" -eq "0" ]; then
115 cyg_env_var="failed";
116 echo "*** NO! ***";
117 echo "";
118 echo "Your \$CYGWIN environment variable specifies \"nobinmode\". This is";
119 echo "likely to result in failure of validation tests, and (possibly) of";
120 echo "the whole install process. You need to have the \$CYGWIN environment";
121 echo "variable set to \"binmode\". Please refer to the Cygwin user guide for";
122 echo "details on how to change this.";
123 test_proceed;
124 else
125 echo "yes";
126 fi;
127 fi;
128
129 login=`whoami`
130 echo -n "Checking legitimate login name... ";
131 echo ${login} | grep " " >/dev/null 2>&1;
132 if [ "$?" -eq "0" ]; then
133 echo "NO!";
134 echo "";
135 echo "Your username (${login}) contains spaces,";
136 echo "which makes the installation of ns-2 impossible.";
137 echo "Please try to install ns-2 as a different user, whose";
138 echo "name does not contain any spaces.";
139
140 test_proceed;
141 else
142 echo "ok";
143 fi;
144
145 echo -n "Checking legitimate path name... ";
146
147 installpath=`cygpath -d /`;
148 echo ${installpath} | grep " " >/dev/null 2>&1;
149 if [ "$?" -eq "0" ]; then
150 echo "NO!";
151 echo "";
152 echo "Your Cygwin installation path (${installpath}) contains spaces,";
153 echo "which makes the installation of ns-2 impossible.";
154 echo "Please reinstall Cygwin in a different directory, which";
155 echo "does not contain any spaces.";
156 test_proceed;
157 else
158 echo "ok";
159 fi;
160
161 test_packages ${packages_base}
162
163 echo -n "Checking for diff... ";
164 diff -v 2>&1 | grep -iv "not found" >/dev/null 2>&1;
165 if [ "$?" -eq "0" ]; then
166 echo "ok";
167 else
168 echo "NO!";
169 echo "";
170 echo "diff is not present on your system.";
171 echo "";
172 echo "Please install it using Cygwin's setup.exe";
173 echo "before trying to install the ns-2 distribution.";
174 test_proceed;
175 fi;
176
177 echo -n "Checking for X... ";
178 test_packages ${packages_xorg}
179 }
180
181
182 # Package VERSIONs. Change these when releasing new packages
183 TCLVER=8.5.8
184 TKVER=8.5.8
185 OTCLVER=1.14
186 TCLCLVER=1.20
187 NSVER=2.35
188 NAMVER=1.15
189 XGRAPHVER=12.2
190 ZLIBVER=1.2.3
191 DEI80211MRVER=1.1.4
192
193 # Get current path
194 CUR_PATH=`pwd`
195
196 echo "============================================================"
197 echo "* Testing for Darwin (OS X) environment"
198 echo "============================================================"
199 if [ `uname` = "Darwin" ]; then
200 echo "Darwin detected";
201 DYLD_LIBRARY_PATH=$CUR_PATH/tcl$TCLVER/unix:$CUR_PATH/tk$TKVER/unix:$DYLD_LIBRARY_PATH
202 export DYLD_LIBRARY_PATH
203 test_darwin=true
204 fi
205
206 # A Cygwin install requires these packages:
207 packages_base="gcc4 gcc4-g++ gawk tar gzip make patch perl w32api"
208 packages_xorg="xorg-server xinit libX11-devel"
209
210 # Check if we are using Cygwin, and if so, if it is a good install
211 # Most Cygwin fixes in the tree and this part of the install script were
212 # contributed by Nicolas Christin <[email protected]>
213
214 echo "============================================================"
215 echo "* Testing for Cygwin environment"
216 echo "============================================================"
217
218 if [ -x /usr/bin/uname ]; then
219 # it may be a Cygwin install
220 test_cygwin=`uname | tr [a-z] [A-Z] | sed -e 's|.*CYGWIN.*|true|'`;
221 if [ "${test_cygwin}" = "true" ]; then
222 echo "Cygwin detected";
223 echo "Note: Cygwin install is still considered EXPERIMENTAL";
224 echo "";
225 cygwin_tests;
226
227 echo "Patching Tcl/Tk for Cygwin.";
228 if [ ! -f ./tcl${TCLVER}/generic/tcl.h.orig ]; then
229 cp ./tcl${TCLVER}/generic/tcl.h ./tcl${TCLVER}/generic/tcl.h.orig;
230 echo "The original tcl${TCLVER}/generic/tcl.h is backed up as tcl${TCLVER}/generic/tcl.h.orig";
231 sed -e 's/\#define _TCL/\#define _TCL\`\`\#ifdef __CYGWIN__\`\#define HAVE_TM_ZONE 1\`\#endif \/\* __CYGWIN__ \*\//g' ./tcl${TCLVER}/generic/tcl.h.orig | tr '\`' '\n' > ./tcl${TCLVER}/generic/tcl.h;
232 cp ./tk${TCLVER}/generic/default.h ./tk${TCLVER}/generic/default.h.orig;
233 echo "The original tk${TKVER}/generic/default.h is backed up as tk${TKVER}/generic/default.h.orig";
234 sed -e 's/defined(__CYGWIN__) || defined(__MINGW32__)/0/g' ./tk${TKVER}/generic/default.h.orig > ./tk${TKVER}/generic/default.h;
235 fi;
236 touch ./tcl${TCLVER}/generic/tclStubInit.c;
237 echo "Patching sgb for Cygwin.";
238 cp ./sgb/Makefile ./sgb/Makefile.orig;
239 echo "The original sgb/Makefile is backed up as sgb/Makefile.orig";
240 sed -e 's|rm \(.*\)test_io test_graph test_flip test_sample\(.*\)|rm -f \1test_io.exe test_graph.exe test_flip.exe test_sample.exe\2|' ./sgb/Makefile.orig > ./sgb/Makefile;
241 echo "Setting executable format to .exe...";
242 EXE=".exe";
243 else
244 echo "Cygwin not detected, proceeding with regular install.";
245 EXE=;
246 fi;
247 else
248 echo "Cygwin not detected, proceeding with regular install.";
249 fi;
250
251 echo "============================================================"
252 echo "* Testing for FreeBSD environment"
253 echo "============================================================"
254 # See if we need to use gmake.
255 if [ "`uname -s`" = "FreeBSD" ]; then
256 echo "FreeBSD detected; using gmake instead of make"
257 if (type gmake &>/dev/null); then
258 alias make="gmake"
259 fi
260 else
261 echo "FreeBSD not detected"
262 fi
263
264 # Compile and install xgraph
265
266 echo "============================================================"
267 echo "* Build XGraph-$XGRAPHVER"
268 echo "============================================================"
269
270 cd ./xgraph-$XGRAPHVER
271 ./configure --prefix=../
272 if [ "${test_cygwin}" = "true" ]; then
273 touch stamp-h;
274 fi;
275 if make
276 then
277 echo "xgraph has been installed successfully. "
278 else
279 echo "Can not create xgraph; But xgraph is an optional package, continuing..."
280 fi
281
282 cd ../
283
284 # Compile and install cweb and sgblib
285
286 echo "============================================================"
287 echo "* Build CWeb"
288 echo "============================================================"
289
290 cd ./cweb
291
292 if [ ! -f ./Makefile ]
293 then
294 echo "ns-allinone unable to install cweb for you. Please install it manually. cweb is used by sgb to create sgblibrary needed by scenario-generator. But this will not affect the use of ns as such, so continue.."
295 else
296 echo "Making cweb"
297 touch *.c
298 make all || warn "cweb failed to make, but it's optional"
299 # xxx: other stuff will fail...
300 chmod 755 cweave${EXE}
301 chmod 755 ctangle${EXE}
302 cd ..
303 #echo "cd .."
304 if [ ! -d bin ]
305 then
306 mkdir bin
307 fi
308 cd bin
309 ln -s $CUR_PATH/cweb/cweave${EXE} cweave${EXE}
310 ln -s $CUR_PATH/cweb/ctangle${EXE} ctangle${EXE}
311 fi
312
313 cd ..
314 PATH=$CUR_PATH/bin:$PATH
315 export PATH
316
317 echo "============================================================"
318 echo "* Build Stanford GraphBase"
319 echo "============================================================"
320
321 cd ./sgb
322 if [ ! -f ./Makefile ]
323 then
324 echo "Unable to create sgb library. This library is used by gt-itm and so for scenario generators. If you already have sgblib (possible if you are on solaris,sunos or freebsd platforms) you may still be able to run gt-itm. so continuing.."
325 else
326 echo "Making sgb"
327 if make tests
328 then
329 if [ -f libgb.a ] ; then
330 rm -f ../gt-itm/lib/libgb.a
331 cp libgb.a ../gt-itm/lib/libgb.a
332 else
333 echo "* Weird: sgb said it has been built but we can't find libgb.a! "
334 exit -1
335 fi
336 else
337 echo "Unable to create sgb library, but it's optional, so continuing..."
338 fi
339 fi
340
341 cd ..
342
343 # Compile and install gt-itm & sgb2ns
344
345 echo "============================================================"
346 echo "* Build GT-ITM"
347 echo "============================================================"
348
349 if [ -f ./gt-itm/lib/libgb.a ]
350 then
351 if [ ! -f ./gt-itm/src/Makefile ]
352 then
353 echo "ns-alline is unable to install gt-itm sgb2ns for you, please install"
354 echo "them manually. You can't run scenario generator without gt-itm"
355 echo "and sgb2ns. But it will not affect you use ns, so continue ..."
356 else
357 cd ./gt-itm/src
358 if make
359 then
360 echo "gt-itm has been installed successfully."
361 fi
362
363 cd ../sgb2ns
364 if make
365 then
366 echo "sgb2ns has been installed successfully."
367 fi
368 cd ../../
369 fi
370 else
371 echo "sgb lib not found. gt-itm & sgb2ns could not be installed. Continuing.."
372 fi
373
374 # Build zlib
375
376 echo "============================================================"
377 echo "* Build zlib"
378 echo "============================================================"
379
380 cd ./zlib-$ZLIBVER
381
382 if ./configure --exec-prefix=../ --prefix=../
383 then
384 if make
385 then
386 echo "Zlib has been installed successfully."
387 else
388 warn "Zlib make failed, but it's optional Continue ..."
389 fi
390 else
391 warn "Zlib-$ZLIBVER configuration failed, but it's optional, so continuing ..."
392 fi
393
394 cd ../
395
396 # Build Tcl8.4.18
397
398 echo "============================================================"
399 echo "* Build tcl$TCLVER"
400 echo "============================================================"
401
402 cd ./tcl$TCLVER/unix
403 if [ -f Makefile ] ; then
404 make distclean
405 fi
406
407 blame='Tcl is not part of the ns project. Please see www.Scriptics.com
408 to see if they have a fix for your platform.'
409 autoconf
410 ./configure --enable-gcc --disable-shared --prefix=$CUR_PATH || die "tcl$TCLVER configuration failed! Exiting ..."
411 if make
412 then
413 echo "tcl$TCLVER make succeeded."
414 make install || die "tcl$TCLVER installation failed."
415 make install-private-headers || die "tcl$TCLVER installation failed."
416 echo "tcl$TCLVER installation succeeded."
417 #cp ../generic/*.h ../../include
418 else
419 echo "tcl$TCLVER make failed! Exiting ..."
420 echo "For problems with Tcl/Tk see http://www.scriptics.com"
421 exit
422 fi
423
424 cd ../../
425
426 # compile and install tk
427
428 echo "============================================================"
429 echo "* Build Tk$TKVER"
430 echo "============================================================"
431
432 cd ./tk$TKVER/unix
433 if [ -f Makefile ] ; then
434 make distclean
435 fi
436
437 blame='Tk is not part of the ns project. Please see www.Scriptics.com
438 to see if they have a fix for your platform.'
439 autoconf
440 ./configure --enable-gcc --disable-shared --disable-xft --disable-xss --prefix=$CUR_PATH || die "tk$TKVER configuration failed! Exiting ..."
441 if make
442 then
443 echo "tk$TKVER build succeeded."
444 make install || die "tk$TKVER installation failed."
445 make install-private-headers || die "tcl$TCLVER installation failed."
446 echo "tk$TKVER installation succeeded."
447 else
448 echo "tk$TKVER make failed! Exiting ..."
449 echo "For problems with Tcl/Tk see http://www.scriptics.com"
450 exit
451 fi
452
453 cd ../../
454
455 #
456 # Since our configures search for tclsh in $PATH, the following
457 # is needed. This is necessary for otcl/tclcl/ns/nam
458 #
459 #PATH=$CUR_PATH/tcl$TCLVER/unix:$CUR_PATH/tk$TKVER/unix:$PATH
460 #LD_LIBRARY_PATH=$CUR_PATH/tcl$TCLVER/unix:$CUR_PATH/tk$TKVER/unix:$LD_LIBRARY_PATH
461
462 # However, the above library path setting has been found to be still
463 # fragile for systems that have multiple versions of Tcl/Tk installed
464 # in various places, so in the below, we will force the allinone build
465 # to use the tcl/tk version installed with allinone by passing the
466 # --with-tcl-ver and --with-tk-ver options
467
468 # Build otcl
469
470 echo "============================================================"
471 echo "* Build OTcl-$OTCLVER"
472 echo "============================================================"
473
474 cd ./otcl-$OTCLVER
475
476 blame='Please check http://www.isi.edu/nsnam/ns/ns-problems.html
477 for common problems and bug fixes.'
478 if [ "${test_cygwin}" = "true" ]; then
479 ./configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include --with-tcl-ver=$TCLVER --with-tk-ver=$TKVER --disable-shlib || die "otcl-$OTCLVER configuration failed! Exiting ...";
480 if make
481 then
482 echo "otcl-$OTCLVER has been installed successfully."
483 else
484 echo "otcl-$OTCLVER make failed! Exiting ..."
485 echo "See http://www.isi.edu/nsnam/ns/ns-problems.html for problems"
486 exit
487 fi
488 else
489 ./configure --with-tcl-ver=$TCLVER --with-tk-ver=$TKVER || die "otcl-$OTCLVER configuration failed! Exiting ...";
490
491 if make
492 then
493 echo "otcl-$OTCLVER has been installed successfully."
494 else
495 echo "otcl-$OTCLVER make failed! Exiting ..."
496 echo "See http://www.isi.edu/nsnam/ns/ns-problems.html for problems"
497 exit
498 fi
499 fi
500
501 cd ..
502
503 # Build tclcl
504
505 echo "============================================================"
506 echo "* Build Tclcl-$TCLCLVER"
507 echo "============================================================"
508
509 cd ./tclcl-$TCLCLVER
510
511 if [ "${test_cygwin}" = "true" ]; then
512 ./configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include --with-tcl-ver=$TCLVER --with-tk-ver=$TKVER || die "tclcl-$TCLCLVER configuration failed! Exiting ...";
513 else
514 ./configure --with-otcl=../otcl-$OTCLVER --with-tcl-ver=$TCLVER --with-tk-ver=$TKVER || die "tclcl-$TCLCLVER configuration failed! Exiting ..."
515 fi
516
517 if make
518 then
519 echo "tclcl-$TCLCLVER has been installed successfully."
520 else
521 echo "tclcl-$TCLCLVER make failed! Exiting ..."
522 echo "See http://www.isi.edu/nsnam/ns/ns-problems.html for problems"
523 exit
524 fi
525
526 cd ../
527
528 # John's hack
529 test -f ./otcl-$OTCLVER/libotcl.a && rm ./otcl-$OTCLVER/libotcl.so
530
531 echo "============================================================"
532 echo "* Build ns-$NSVER"
533 echo "============================================================"
534
535 cd ./ns-$NSVER
536 if [ -f Makefile ] ; then
537 make distclean
538 fi
539
540 if [ "${test_cygwin}" = "true" ]; then
541 ./configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include --with-tcl-ver=$TCLVER --with-tk-ver=$TKVER || die "Ns configuration failed! Exiting ...";
542 else
543 ./configure --with-otcl=../otcl-$OTCLVER --with-tclcl=../tclcl-$TCLCLVER --with-tcl-ver=$TCLVER --with-tk-ver=$TKVER || die "Ns configuration failed! Exiting ...";
544 fi
545
546 if make
547 then
548 echo " Ns has been installed successfully."
549 else
550 echo "Ns make failed!"
551 echo "See http://www.isi.edu/nsnam/ns/ns-problems.html for problems"
552 exit
553 fi
554
555 cd ../
556
557 # Build nam
558
559 echo "============================================================"
560 echo "* Build nam-$NAMVER"
561 echo "============================================================"
562
563 ln -s otcl-$OTCLVER otcl
564 ln -s tclcl-$TCLCLVER tclcl
565
566 cd ./nam-$NAMVER
567
568 # XXX temporary OS X hack
569 if [ "${test_darwin}" = "true" ]; then
570 ln -s /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation libcorefoundation.dylib
571 fi
572
573 if [ "${test_cygwin}" = "true" ]; then
574 ./configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include --with-tclcl=$CUR_PATH/tclcl-$TCLCLVER --with-tcl-ver=$TCLVER --with-tk-ver=$TKVER || die "Nam configuration failed! Exiting ...";
575 else
576 ./configure --with-otcl=../otcl-$OTCLVER --with-tclcl=../tclcl-$TCLCLVER --with-tcl-ver=$TCLVER --with-tk-ver=$TKVER || die "Nam configuration failed! Exiting ...";
577 fi
578
579 if make
580 then
581 echo "Nam has been installed successfully."
582 elif [ "${test_darwin}" = "true" ]; then
583 # XXX workaround for OS X nam Tcl/Tk problems
584 echo "Nam make failed! Trying to relink..."
585 echo "g++ -o nam tkcompat.o tkUnixInit.o xwd.o netview.o netmodel.o edge.o packet.o node.o main.o trace.o queue.o drop.o animation.o agent.o feature.o route.o transform.o paint.o state.o monitor.o anetmodel.o random.o rng.o view.o graphview.o netgraph.o tracehook.o lan.o psview.o group.o editview.o tag.o address.o animator.o wnetmodel.o nam_stream.o enetmodel.o testview.o parser.o trafficsource.o lossmodel.o queuehandle.o gen/version.o gen/nam_tcl.o ../tcl8.5.8/unix/libtcl8.5.a ../tk8.5.8/unix/libtk8.5.a ../tcl8.5.8/unix/libtclstub8.5.a -L../tclcl-1.20 -ltclcl -L../otcl -lotcl -L/usr/lib -lz -L/usr/X11R6/lib -lXext -lX11 -lm -L. -lcorefoundation"
586 g++ -o nam tkcompat.o tkUnixInit.o xwd.o netview.o netmodel.o edge.o packet.o node.o main.o trace.o queue.o drop.o animation.o agent.o feature.o route.o transform.o paint.o state.o monitor.o anetmodel.o random.o rng.o view.o graphview.o netgraph.o tracehook.o lan.o psview.o group.o editview.o tag.o address.o animator.o wnetmodel.o nam_stream.o enetmodel.o testview.o parser.o trafficsource.o lossmodel.o queuehandle.o gen/version.o gen/nam_tcl.o ../tcl8.5.8/unix/libtcl8.5.a ../tk8.5.8/unix/libtk8.5.a ../tcl8.5.8/unix/libtclstub8.5.a -L../tclcl-1.20 -ltclcl -L../otcl -lotcl -L/usr/lib -lz -L/usr/X11R6/lib -lXext -lX11 -lm -L. -lcorefoundation
587 if [ -e nam ]; then
588 echo "Nam relinking succeeded; nam has been installed successfully."
589 else
590 echo "Nam make failed! You may want to tweak the above linker path if libraries are not being picked up successfuly. Continue ..."
591 echo "See http://www.isi.edu/nsnam/ns-problems.html for problems"
592 fi
593 else
594 echo "Nam make failed! Continue ..."
595 echo "See http://www.isi.edu/nsnam/ns-problems.html for problems"
596 fi
597
598 cd ../
599
600
601
602 # Building dei80211mr
603
604 cd ./dei80211mr-${DEI80211MRVER}
605
606 ./configure --with-ns-allinone=${CUR_PATH} --prefix=${CUR_PATH} \
607 && make \
608 && make install
609
610 cd ..
611
612
613 # Install nam, ns, xgraph into bin
614
615 if [ ! -d bin ] ; then
616 mkdir bin
617 fi
618
619 cd bin
620
621 ln -s $CUR_PATH/ns-$NSVER/ns${EXE} ns${EXE}
622
623 if test -x $CUR_PATH/nam-$NAMVER/nam${EXE}
624 then
625 ln -s $CUR_PATH/nam-$NAMVER/nam${EXE} nam${EXE}
626 else
627 echo "Please compile your nam separately."
628 fi
629
630 if test -x $CUR_PATH/xgraph-$XGRAPHVER/xgraph${EXE}
631 then
632 ln -s $CUR_PATH/xgraph-$XGRAPHVER/xgraph${EXE} xgraph${EXE}
633 else
634 echo "Please compile your xgraph separately."
635 fi
636
637 if test -x $CUR_PATH/gt-itm/bin/sgb2ns${EXE}
638 then
639 ln -s $CUR_PATH/gt-itm/bin/sgb2ns${EXE} sgb2ns${EXE}
640 ln -s $CUR_PATH/gt-itm/bin/sgb2hierns${EXE} sgb2hierns${EXE}
641 ln -s $CUR_PATH/gt-itm/bin/sgb2comns${EXE} sgb2comns${EXE}
642 ln -s $CUR_PATH/gt-itm/bin/itm${EXE} itm${EXE}
643 ln -s $CUR_PATH/gt-itm/bin/sgb2alt${EXE} sgb2alt${EXE}
644 ln -s $CUR_PATH/gt-itm/bin/edriver${EXE} edriver${EXE}
645 else
646 echo "Please compile your gt-itm & sgb2ns separately."
647 fi
648
649 echo ""
650 echo "Ns-allinone package has been installed successfully."
651 echo "Here are the installation places:"
652 echo "tcl$TCLVER: $CUR_PATH/{bin,include,lib}"
653 echo "tk$TKVER: $CUR_PATH/{bin,include,lib}"
654 echo "otcl: $CUR_PATH/otcl-$OTCLVER"
655 echo "tclcl: $CUR_PATH/tclcl-$TCLCLVER"
656 echo "ns: $CUR_PATH/ns-$NSVER/ns"
657
658 if [ -x $CUR_PATH/nam-$NAMVER/nam ]
659 then
660 echo "nam: $CUR_PATH/nam-$NAMVER/nam"
661 fi
662
663 if [ -x $CUR_PATH/xgraph-$XGRAPHVER/xgraph ]
664 then
665 echo "xgraph: $CUR_PATH/xgraph-$XGRAPHVER"
666 fi
667 if [ -x $CUR_PATH/gt-itm/bin/sgb2ns ]
668 then
669 echo "gt-itm: $CUR_PATH/itm, edriver, sgb2alt, sgb2ns, sgb2comns, sgb2hierns"
670 fi
671
672 echo ""
673 echo "----------------------------------------------------------------------------------"
674 echo ""
675 echo "Please put $CUR_PATH/bin:$CUR_PATH/tcl$TCLVER/unix:$CUR_PATH/tk$TKVER/unix"
676 echo "into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph."
677 echo ""
678 echo "IMPORTANT NOTICES:"
679 echo ""
680 echo "(1) You MUST put $CUR_PATH/otcl-$OTCLVER, $CUR_PATH/lib, "
681 echo " into your LD_LIBRARY_PATH environment variable."
682 echo " If it complains about X libraries, add path to your X libraries "
683 echo " into LD_LIBRARY_PATH."
684 echo " If you are using csh, you can set it like:"
685 echo " setenv LD_LIBRARY_PATH <paths>"
686 echo " If you are using sh, you can set it like:"
687 echo " export LD_LIBRARY_PATH=<paths>"
688 echo ""
689 echo "(2) You MUST put $CUR_PATH/tcl$TCLVER/library into your TCL_LIBRARY environmental"
690 echo " variable. Otherwise ns/nam will complain during startup."
691 echo ""
692 echo ""
693 echo "After these steps, you can now run the ns validation suite with"
694 echo "cd ns-$NSVER; ./validate"
695 echo ""
696 echo "For trouble shooting, please first read ns problems page "
697 echo "http://www.isi.edu/nsnam/ns/ns-problems.html. Also search the ns mailing list archive"
698 echo "for related posts."
699 echo ""
700
701 exit 0
702