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