3 set envvars
=(SUIFHOME MACHINE SUIFPATH COMPILER_NAME \
4 MANPATH LD_LIBRARY_PATH PATH TCL_INCLUDE_FLAGS \
6 DEFAULT_SYSTEM_SPECIFIC_CXXFLAGS \
7 DEFAULT_SYSTEM_SPECIFIC_CFLAGS \
10 SYSTEM_SPECIFIC_CFLAGS \
11 SYSTEM_SPECIFIC_CXXFLAGS \
12 INCLDIR SRCDIR MANDIR INFODIR HTMLDIR DOCDIR SCRIPTDIR TCLDIR \
13 MACHDIR BINDIR LIBDIR SODIR \
14 AUTOINITDIR VERDATADIR \
26 if ("$flag1" == '-limits') then
31 if ("$flag1" == '-suifhome') then
34 echo "-suifhome must have an argument"
37 setenv
$SUIFHOME $argv[1]
41 if (("$flag1" == '-csh') ||
("$flag1" == '-sh') ||
("$flag1" == '-perl')) then
50 ((x
"$flag" != 'x-csh') && (x
"$flag" != 'x-sh') && \
51 (x
"$flag" != 'x-perl'))) then
52 echo "Usage: $0 [-limits] [-suifhome home] { -sh | -csh | -perl }"
53 echo " Defaults to csh"
55 else if (! $?SUIFHOME
) then
56 echo "Need SUIFHOME to be set or use the -suifhome option"
60 set gccver
=`gcc -v |& fgrep 'Reading specs' |& head -1`
62 setenv MACHINE
`echo $gccver | sed -e s'/^.*gcc-lib\///' | \
66 if (! $?SUIFPATH
) then
67 setenv SUIFPATH
`echo $gccver | sed -e 's/Reading specs from //' | \
71 if (! $?COMPILER_NAME
) then
72 echo $MACHINE |
grep '^sparc-sun-solaris[.0-9]*$' >& /dev
/null
73 if ((! $status) && ($COMPILER_NAME == 'sun_procompiler')) then
74 setenv MACHINE
"${MACHINE}-sunpro"
75 else if (($MACHINE == 'mips-sgi-irix5.3) && \
76 ($COMPILER_NAME =~ gcc*)) then
77 setenv MACHINE "${MACHINE}-gcc"
79 else if ($MACHINE == "mips-sgi-irix5.3") then
80 setenv COMPILER_NAME 'sgi_c
++'
81 else if ($MACHINE =~ i386-*-solaris2.4) then
82 setenv COMPILER_NAME 'sun_procompiler
'
83 else if ($MACHINE == 'i586-linux
') then
84 setenv COMPILER_NAME 'egcs
'
85 setenv CC_OVERRIDE 'gcc
'
86 setenv CXX_OVERRIDE 'g
++'
88 setenv COMPILER_NAME 'egcs
'
89 setenv CC_OVERRIDE 'egcc
'
90 setenv CXX_OVERRIDE 'eg
++'
94 echo $MANPATH | fgrep "$SUIFHOME/man" >& /dev/null
96 setenv MANPATH "$SUIFHOME/man:$MANPATH"
99 set oldmanpath=`man -w`
102 $oldmanpath="/krb5/man:/usr/share/catman:/usr/share/man:/usr/catman:/usr/man:/opt/SUNWspro/man:/usr/local/man"
104 setenv MANPATH "$SUIFHOME/man:$oldmanpath"
107 if ($?LD_LIBRARY_PATH) then
108 setenv LD_LIBRARY_PATH "$SUIFHOME/$MACHINE/solib:$LD_LIBRARY_PATH"
110 setenv LD_LIBRARY_PATH "$SUIFHOME/$MACHINE/solib"
113 # put SUIFHOME dirs in path
114 echo $PATH | fgrep "${SUIFHOME}/${MACHINE}/bin" >& /dev/null
116 setenv PATH "${SUIFHOME}/${MACHINE}/bin:${PATH}"
118 echo $SUIFPATH | fgrep "${SUIFHOME}/${MACHINE}/bin" >& /dev/null
120 setenv SUIFPATH "${SUIFHOME}/${MACHINE}/bin:${SUIFPATH}"
123 # For the vbrowser, we need to include <tcl.h>, which isn't
in
124 # /usr/include on all our machines. The following handles that issue.
126 if ($MACHINE == 'mips-sgi-irix5.3') then
127 setenv TCL_INCLUDE_FLAGS
'-I/usr/local/include'
128 else if ($MACHINE == 'sparc-sun-solaris2.3') then
129 setenv TCL_INCLUDE_FLAGS
'-I/usr/openwin/include -DTK4_1 -L/usr/openwin/lib'
130 else if ($MACHINE =~ i386-
*-solaris2.4
) then
131 setenv TCL_INCLUDE_FLAGS
'-I/usr/local/include -I/usr/openwin/include -L/usr/local/lib -L/usr/openwin/lib'
132 else if ($MACHINE =~ sparc-sun-solaris
*) then
133 setenv TCL_INCLUDE_FLAGS
'-I/usr/local/include -I/usr/local/ultra/include -I/usr/openwin/include -L/usr/local/lib -L/usr/local/ultra/lib -L/usr/openwin/lib'
134 else if ($MACHINE == 'alpha-dec-osf3.2') then
135 setenv TCL_INCLUDE_FLAGS
'-I/usr/local/ultra/include -L/usr/local/ultra/lib'
137 echo $MACHINE |
grep linux
>& /dev
/null
139 setenv TCL_INCLUDE_FLAGS
'-L/usr/X11R6/lib'
144 if (! $?SRCDIR
) setenv SRCDIR
"$SUIFHOME/src"
145 if (! $?INFODIR
) setenv INFODIR
"$SUIFHOME/info"
146 if (! $?DOCDIR
) setenv DOCDIR
"$SUIFHOME/docs"
148 if (! $?HTMLDIR
) setenv HTMLDIR
"$SUIFHOME/html"
149 if (! $?MANDIR
) setenv MANDIR
"$SUIFHOME/man"
150 if (! $?SCRIPTDIR
) setenv SCRIPTDIR
"$SUIFHOME/scripts"
151 if (! $?TCLDIR
) setenv TCLDIR
"$SUIFHOME/tcl"
153 # machine-specific directories
154 if (! $?MACHDIR
) setenv MACHDIR
"$SUIFHOME/$MACHINE"
155 if (! $?INCLDIR
) setenv INCLDIR
"$MACHDIR/include"
156 if (! $?BINDIR
) setenv BINDIR
"$MACHDIR/bin"
157 if (! $?LIBDIR
) setenv LIBDIR
"$MACHDIR/lib"
158 if (! $?SODIR
) setenv SODIR
"$MACHDIR/solib"
159 if (! $?AUTOINITDIR
) setenv AUTOINITDIR
"$MACHDIR/auto_init_libs"
160 if (! $?VERDATADIR
) setenv VERDATADIR
"$MACHDIR/verdata"
162 # different name is used by vbrowser
163 setenv VISUAL_TCL
$TCLDIR
166 if (! $?PUREHOME
) setenv PUREHOME
'/usr/local/pure'
168 setenv PURE
"$PUREHOME/purify"
169 if ($?PURE_COLLECTOR
) then
170 setenv PURE_FLAGS
"-collector=$PURE_COLLECTOR"
175 set var
=${envvars[1]}
177 set val
=`printenv $var`
179 if (x
$flag == 'x-csh') then
180 echo "setenv $var '$val'"
181 else if (x
$flag == 'x-sh') then
182 echo "export $var; $var='$val';"
183 else if (x
$flag == 'x-perl') then
184 echo '$'"ENV{$var}='"$val"';"
188 if ($limits_off) then
189 echo "unlimit datasize;\n";