author | Claus Gittinger <cg@exept.de> |
Thu, 05 Feb 1998 23:34:05 +0100 | |
changeset 262 | e846b6cafcde |
parent 247 | 207a28eb1f54 |
child 264 | 4a82dfa0883d |
permissions | -rwxr-xr-x |
151 | 1 |
#!/bin/sh |
2 |
||
3 |
# $Header$ |
|
4 |
# |
|
5 |
# |
|
6 |
# startup script for smalltalk |
|
7 |
# actually, simply calls stx, passing all arguments. |
|
8 |
# |
|
9 |
||
10 |
# In previous versions, smalltalk used to be the executable itself. |
|
11 |
# This lead to problems on systems, where things like LD_LIBRARY_PATH |
|
12 |
# should be set in advance. |
|
13 |
# Now, here is a place to do such things ... |
|
14 |
||
164 | 15 |
# |
192 | 16 |
# -x name specifies an explicit executable |
17 |
# |
|
193 | 18 |
if [ "$1" = "-x" ] |
192 | 19 |
then |
20 |
shift |
|
21 |
STX=$1 |
|
22 |
shift |
|
23 |
else |
|
24 |
STX=stx |
|
25 |
fi |
|
26 |
||
262 | 27 |
if [ "$1" = "-ldd" ] |
28 |
then |
|
29 |
shift |
|
30 |
DEBUGLIB="yes" |
|
31 |
fi |
|
32 |
||
192 | 33 |
# |
34 |
# |
|
164 | 35 |
# some have Xlibs in /usr/openwin/lib ... |
36 |
# |
|
157 | 37 |
if [ -d /usr/openwin/lib ] |
38 |
then |
|
234
861d75db3bec
do not clobber existing LD_LIBRARY_PATH
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
39 |
if [ "$LD_LIBRARY_PATH" != "" ] |
861d75db3bec
do not clobber existing LD_LIBRARY_PATH
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
40 |
then |
247 | 41 |
LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH:/usr/openwin/lib:/usr/local/lib/smalltalk/lib |
234
861d75db3bec
do not clobber existing LD_LIBRARY_PATH
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
42 |
else |
243 | 43 |
LD_LIBRARY_PATH=.:/usr/openwin/lib:/usr/local/lib/smalltalk/lib |
234
861d75db3bec
do not clobber existing LD_LIBRARY_PATH
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
44 |
fi |
157 | 45 |
else |
234
861d75db3bec
do not clobber existing LD_LIBRARY_PATH
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
46 |
if [ "$LD_LIBRARY_PATH" != "" ] |
861d75db3bec
do not clobber existing LD_LIBRARY_PATH
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
47 |
then |
247 | 48 |
LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH:/usr/local/lib/smalltalk/lib |
234
861d75db3bec
do not clobber existing LD_LIBRARY_PATH
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
49 |
else |
243 | 50 |
LD_LIBRARY_PATH=.:/usr/local/lib/smalltalk/lib |
234
861d75db3bec
do not clobber existing LD_LIBRARY_PATH
Claus Gittinger <cg@exept.de>
parents:
193
diff
changeset
|
51 |
fi |
157 | 52 |
fi |
164 | 53 |
|
54 |
# |
|
55 |
# my own libs may be found in STX_LIBDIR/lib |
|
247 | 56 |
# STX_LIBDIR is to be set to the top of the smalltalk installation |
57 |
# (i.e. where all the .rc files are located) |
|
164 | 58 |
# |
242 | 59 |
|
164 | 60 |
if [ "$STX_LIBDIR" != "" ] |
61 |
then |
|
243 | 62 |
if [ "$STX_LIBDIR" != "/usr/local/smalltalk" ] |
63 |
then |
|
247 | 64 |
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$STX_LIBDIR/lib |
243 | 65 |
fi |
164 | 66 |
fi |
67 |
||
247 | 68 |
|
155 | 69 |
export LD_LIBRARY_PATH |
247 | 70 |
|
71 |
# |
|
72 |
# debugging shared libs ... |
|
73 |
# |
|
262 | 74 |
if [ "$DEBUGLIB" == "yes" ] |
75 |
then |
|
76 |
echo "used LD_LIBRARY_PATH is " $LD_LIBRARY_PATH |
|
77 |
ldd -r $STX |
|
78 |
echo "used stx is " `which $STX` |
|
79 |
fi |
|
247 | 80 |
|
192 | 81 |
exec $STX $* |