3 # Put the path to the socks shared library in our LD_LIBRARY_PATH so when we
4 # preload the library, ld.so will find it...
6 if test -n "${SOCKS5_SHLIB_RUNPATH}" ; then
7 SOCKS5_SHLIB_RUNPATH="${SOCKS5_SHLIB_RUNPATH}/"
8 elif test -n "/usr/local/lib"; then
9 SOCKS5_SHLIB_RUNPATH="/usr/local/lib/"
11 SOCKS5_SHLIB_RUNPATH="./"
15 # Some OS's use PRELOADS=lib while others use _RLD_LIST=lib:DEFAULT. Hopefully
16 # this can handle all those cases. At any rate, this is basically causing the
17 # socks5 shared libary to be used to resolve symbols before other libraries,
18 # hence we get socks's connect before we get libc's connect...
20 # Also, on SunOS 4*, LD_LIBRARY_PATH has no effect on, so we need to put the path
21 # in front of it. We make the path overridable with SOCKS5_SHLIB_RUNPATH...
25 LD_PRELOAD=${SOCKS5_SHLIB_RUNPATH}libsocks5_sh.so
29 if test -z "$LD_LIBRARY_PATH" ; then
30 LD_LIBRARY_PATH=${SOCKS5_SHLIB_RUNPATH}
32 LD_LIBRARY_PATH=${SOCKS5_SHLIB_RUNPATH}:${LD_LIBRARY_PATH}
33 export LD_LIBRARY_PATH
36 LD_PRELOAD=libsocks5_sh.so
37 export LD_LIBRARY_PATH
41 # Run the actual program...