Correct logical error in STRICT_ALIGNMENT check and remove copy of
[openssl.git] / util / opensslwrap.sh
1 #!/bin/sh
2
3 HERE="`echo $0 | sed -e 's|[^/]*$||'`"
4 OPENSSL="${HERE}../apps/openssl"
5
6 if [ -x "${OPENSSL}.exe" ]; then
7         # The original reason for this script existence is to work around
8         # certain caveats in run-time linker behaviour. On Windows platforms
9         # adjusting $PATH used to be sufficient, but with introduction of
10         # SafeDllSearchMode in XP/2003 the only way to get it right in
11         # *all* possible situations is to copy newly built .DLLs to apps/
12         # and test/, which is now done elsewhere... The $PATH is adjusted
13         # for backward compatibility (and nostagical reasons:-).
14         if [ "$OSTYPE" != msdosdjgpp ]; then
15                 PATH="${HERE}..:$PATH"; export PATH
16         fi
17         exec "${OPENSSL}.exe" "$@"
18 elif [ -x "${OPENSSL}" -a -x "${HERE}shlib_wrap.sh" ]; then
19         exec "${HERE}shlib_wrap.sh" "${OPENSSL}" "$@"
20 else
21         exec "${OPENSSL}" "$@"  # hope for the best...
22 fi