shlib_wrap.sh.in (1.1.1.3) | shlib_wrap.sh.in (1.1.1.1) |
---|---|
1#!/bin/sh 2 | 1#!/bin/sh 2 |
3# To test this OpenSSL version's applications against another version's 4# shared libraries, simply set 5# 6# OPENSSL_REGRESSION=/path/to/other/OpenSSL/build/tree 7if [ -n "$OPENSSL_REGRESSION" ]; then 8 shlibwrap="$OPENSSL_REGRESSION/util/shlib_wrap.sh" 9 if [ -x "$shlibwrap" ]; then 10 # We clear OPENSSL_REGRESSION to avoid a loop, should the shlib_wrap.sh 11 # we exec also support that mechanism... 12 OPENSSL_REGRESSION= exec "$shlibwrap" "$@" 13 else 14 if [ -f "$shlibwrap" ]; then 15 echo "Not permitted to run $shlibwrap" >&2 16 else 17 echo "No $shlibwrap, perhaps OPENSSL_REGRESSION isn't properly set?" >&2 18 fi 19 exit 1 20 fi 21fi 22 | |
23[ $# -ne 0 ] || set -x # debug mode without arguments:-) 24 25THERE="`echo $0 | sed -e 's|[^/]*$||' 2>/dev/null`.." 26[ -d "${THERE}" ] || exec "$@" # should never happen... 27 28# Alternative to this is to parse ${THERE}/Makefile... 29LIBCRYPTOSO="${THERE}/libcrypto.so" 30if [ -f "$LIBCRYPTOSO" ]; then --- 65 unchanged lines hidden (view full) --- 96 # of SafeDllSearchMode in XP/2003 it's more appropriate to copy 97 # .DLLs in vicinity of executable, which is done elsewhere... 98 if [ "$OSTYPE" != msdosdjgpp ]; then 99 PATH="${THERE}:$PATH"; export PATH 100 fi 101 ;; 102esac 103 | 3[ $# -ne 0 ] || set -x # debug mode without arguments:-) 4 5THERE="`echo $0 | sed -e 's|[^/]*$||' 2>/dev/null`.." 6[ -d "${THERE}" ] || exec "$@" # should never happen... 7 8# Alternative to this is to parse ${THERE}/Makefile... 9LIBCRYPTOSO="${THERE}/libcrypto.so" 10if [ -f "$LIBCRYPTOSO" ]; then --- 65 unchanged lines hidden (view full) --- 76 # of SafeDllSearchMode in XP/2003 it's more appropriate to copy 77 # .DLLs in vicinity of executable, which is done elsewhere... 78 if [ "$OSTYPE" != msdosdjgpp ]; then 79 PATH="${THERE}:$PATH"; export PATH 80 fi 81 ;; 82esac 83 |
104{- output_off() unless grep (/-rpath\b/, @{$config{LDFLAGS}}); ""; -} | 84{- output_off() if $config{ex_libs} !~ /,-rpath,/; ""; -} |
105if [ -f "$LIBCRYPTOSO" -a -z "$preload_var" ]; then 106 # Following three lines are major excuse for isolating them into 107 # this wrapper script. Original reason for setting LD_PRELOAD 108 # was to make it possible to pass 'make test' when user linked 109 # with -rpath pointing to previous version installation. Wrapping 110 # it into a script makes it possible to do so on multi-ABI 111 # platforms. 112 case "$SYSNAME" in | 85if [ -f "$LIBCRYPTOSO" -a -z "$preload_var" ]; then 86 # Following three lines are major excuse for isolating them into 87 # this wrapper script. Original reason for setting LD_PRELOAD 88 # was to make it possible to pass 'make test' when user linked 89 # with -rpath pointing to previous version installation. Wrapping 90 # it into a script makes it possible to do so on multi-ABI 91 # platforms. 92 case "$SYSNAME" in |
113 *BSD) LD_PRELOAD="$LIBCRYPTOSO:$LIBSSLSO" ;; # *BSD | 93 *BSD|QNX) LD_PRELOAD="$LIBCRYPTOSO:$LIBSSLSO" ;; # *BSD, QNX |
114 *) LD_PRELOAD="$LIBCRYPTOSO $LIBSSLSO" ;; # SunOS, Linux, ELF HP-UX 115 esac 116 _RLD_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT" # Tru64, o32 IRIX 117 DYLD_INSERT_LIBRARIES="$LIBCRYPTOSO:$LIBSSLSO" # MacOS X 118 export LD_PRELOAD _RLD_LIST DYLD_INSERT_LIBRARIES 119fi | 94 *) LD_PRELOAD="$LIBCRYPTOSO $LIBSSLSO" ;; # SunOS, Linux, ELF HP-UX 95 esac 96 _RLD_LIST="$LIBCRYPTOSO:$LIBSSLSO:DEFAULT" # Tru64, o32 IRIX 97 DYLD_INSERT_LIBRARIES="$LIBCRYPTOSO:$LIBSSLSO" # MacOS X 98 export LD_PRELOAD _RLD_LIST DYLD_INSERT_LIBRARIES 99fi |
120{- output_on() unless grep (/-rpath\b/, @{$config{LDFLAGS}}); ""; -} | 100{- output_on() if $config{ex_libs} !~ /,-rpath,/; ""; -} |
121 122cmd="$1"; [ -x "$cmd" ] || cmd="$cmd${EXE_EXT}" 123shift 124if [ $# -eq 0 ]; then 125 exec "$cmd" # old sh, such as Tru64 4.x, fails to expand empty "$@" 126else 127 exec "$cmd" "$@" 128fi | 101 102cmd="$1"; [ -x "$cmd" ] || cmd="$cmd${EXE_EXT}" 103shift 104if [ $# -eq 0 ]; then 105 exec "$cmd" # old sh, such as Tru64 4.x, fails to expand empty "$@" 106else 107 exec "$cmd" "$@" 108fi |