1 |
|
---|
2 | set POSSOSVALUES = HP-UX,AIX,OSF1,SunOS,Solaris,LynxOS,Linux,Darwin,
|
---|
3 | if ($?OS) then
|
---|
4 | echo OS is set to $OS
|
---|
5 | set TEMP = $OS,
|
---|
6 | echo $POSSOSVALUES | grep $TEMP>/dev/null
|
---|
7 | if ( ! $status == 0) then
|
---|
8 | echo Unknown OS... setup failed
|
---|
9 | echo Possible values are: $POSSOSVALUES
|
---|
10 | exit 1
|
---|
11 | endif
|
---|
12 | else
|
---|
13 | echo Variable OS must be defined... setup failed
|
---|
14 | echo Possible values are: $POSSOSVALUES
|
---|
15 | exit 1
|
---|
16 | endif
|
---|
17 |
|
---|
18 | if ( ${OS} == Solaris ) then
|
---|
19 | set path = (/usr/ccs/bin $path)
|
---|
20 | endif
|
---|
21 |
|
---|
22 | if ($?DIMDIR) then
|
---|
23 | echo DIMDIR is set to $DIMDIR
|
---|
24 | else
|
---|
25 | setenv DIMDIR `pwd`
|
---|
26 | echo DIMDIR is set to $DIMDIR
|
---|
27 | endif
|
---|
28 |
|
---|
29 | if ($?ODIR) then
|
---|
30 | echo ODIR is set to $ODIR
|
---|
31 | goto finish
|
---|
32 | endif
|
---|
33 |
|
---|
34 | switch ($OS)
|
---|
35 | case HP-UX:
|
---|
36 | setenv ODIR hp
|
---|
37 | breaksw
|
---|
38 | case AIX:
|
---|
39 | setenv ODIR aix
|
---|
40 | breaksw
|
---|
41 | case OSF1:
|
---|
42 | setenv ODIR osf
|
---|
43 | breaksw
|
---|
44 | case SunOS:
|
---|
45 | setenv ODIR sunos
|
---|
46 | breaksw
|
---|
47 | case Solaris
|
---|
48 | setenv ODIR solaris
|
---|
49 | breaksw
|
---|
50 | case LynxOS:
|
---|
51 | setenv ODIR lynxos
|
---|
52 | breaksw
|
---|
53 | case Linux:
|
---|
54 | setenv machine `uname -m`
|
---|
55 | if ( $machine != x86_64 ) then
|
---|
56 | setenv BITS32 yes
|
---|
57 | echo "default is 32 bits"
|
---|
58 | else
|
---|
59 | echo "default is 64 bits"
|
---|
60 | endif
|
---|
61 | setenv ODIR linux
|
---|
62 | breaksw
|
---|
63 | case Darwin:
|
---|
64 | setenv ODIR darwin
|
---|
65 | breaksw
|
---|
66 | default:
|
---|
67 | echo Unknown OS... setup failed
|
---|
68 | exit 1
|
---|
69 | endsw
|
---|
70 |
|
---|
71 | echo ODIR is set to $ODIR
|
---|
72 |
|
---|
73 | finish:
|
---|
74 | if ( ${OS} == Linux ) then
|
---|
75 | if (! $?LD_LIBRARY_PATH) then
|
---|
76 | setenv LD_LIBRARY_PATH $DIMDIR/$ODIR
|
---|
77 | else
|
---|
78 | setenv LD_LIBRARY_PATH $DIMDIR/$ODIR\:$LD_LIBRARY_PATH
|
---|
79 | endif
|
---|
80 | set path = ($DIMDIR/$ODIR $path)
|
---|
81 | rehash
|
---|
82 | endif
|
---|
83 |
|
---|
84 | alias TestServer $DIMDIR/$ODIR/testServer
|
---|
85 | alias TestClient $DIMDIR/$ODIR/testClient
|
---|
86 | alias Test_server $DIMDIR/$ODIR/test_server
|
---|
87 | alias Test_client $DIMDIR/$ODIR/test_client
|
---|
88 | alias Dns $DIMDIR/$ODIR/dns
|
---|
89 | alias Dim_get_service $DIMDIR/$ODIR/dim_get_service
|
---|
90 | alias Dim_send_command $DIMDIR/$ODIR/dim_send_command
|
---|
91 | alias DimBridge $DIMDIR/$ODIR/DimBridge
|
---|
92 | alias Did $DIMDIR/$ODIR/did
|
---|
93 |
|
---|
94 | if (! -d $DIMDIR/$ODIR) then
|
---|
95 | mkdir $DIMDIR/$ODIR
|
---|
96 | echo Created Directory: $DIMDIR/$ODIR
|
---|
97 | endif
|
---|
98 | exit
|
---|
99 |
|
---|
100 |
|
---|
101 |
|
---|