Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
att
GitHub Repository: att/ast
Path: blob/master/src/lib/libast/features/libpath.sh
1810 views
1
########################################################################
2
# #
3
# This software is part of the ast package #
4
# Copyright (c) 1985-2011 AT&T Intellectual Property #
5
# and is licensed under the #
6
# Eclipse Public License, Version 1.0 #
7
# by AT&T Intellectual Property #
8
# #
9
# A copy of the License is available at #
10
# http://www.eclipse.org/org/documents/epl-v10.html #
11
# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
12
# #
13
# Information and Software Systems Research #
14
# AT&T Research #
15
# Florham Park NJ #
16
# #
17
# Glenn Fowler <[email protected]> #
18
# David Korn <[email protected]> #
19
# Phong Vo <[email protected]> #
20
# #
21
########################################################################
22
ok=0
23
for i in \
24
-x /lib/ld.so /lib/ld-*.so /usr/lib/ld.so /lib/rld \
25
-f /usr/shlib/libc.so /shlib/libc.so /usr/lib/libc.so \
26
-r /usr/shlib/libc.so /shlib/libc.so
27
do case $i in
28
-*) op=$i; continue ;;
29
esac
30
if test $op $i
31
then ok=1
32
break
33
fi
34
set x $i.[0-9]*
35
if test $op $2
36
then ok=1
37
break
38
fi
39
done
40
if test "0" != "$ok"
41
then libpath=lib:LD_LIBRARY_PATH
42
case `package` in
43
sgi.*) if test -d /lib32
44
then libpath="lib32:LD_LIBRARYN32_PATH:sgi.mips3|sgi.*-n32,$libpath"
45
fi
46
if test -d /lib64
47
then libpath="lib64:LD_LIBRARY64_PATH:sgi.mips[4-9]|sgi.*-64,$libpath"
48
fi
49
;;
50
sol*.*) if test -d /lib/32
51
then libpath="lib/32:LD_LIBRARY_PATH_32,$libpath"
52
fi
53
if test -d /lib/64
54
then libpath="lib/64:LD_LIBRARY_PATH_64:sol.*64*,$libpath"
55
fi
56
;;
57
esac
58
elif test -x /lib/dld.sl
59
then libpath=lib:SHLIB_PATH
60
elif test -x /usr/lib/dyld
61
then libpath=lib:DYLD_LIBRARY_PATH
62
else case `package` in
63
ibm.*|mvs.*)
64
libpath=lib:LIBPATH
65
;;
66
*) libpath=
67
;;
68
esac
69
fi
70
case $libpath in
71
'') libpath=bin ;;
72
esac
73
echo "#define CONF_LIBPATH \"$libpath\""
74
75