File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed
Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- # Copyright © 2024 Mobi - Com Polska Sp. z o.o.
3+ # Copyright © 2024-2026 Mobi - Com Polska Sp. z o.o.
44# Author: Małgorzata Olszówka <Malgorzata.Olszowka@stunnel.org>
55#
66# This is free software; you can redistribute it and/or modify it
2020# Save original library path for later restoration
2121TEMP_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
2222
23- # OpenSSL settings
24- if test -n ${PKG_CONFIG_PATH} ; then
25- OPENSSL_PATH=" ${PKG_CONFIG_PATH} /../.."
26- if command -v " ${OPENSSL_PATH} /bin/openssl" & > /dev/null; then
27- OPENSSL=" ${OPENSSL_PATH} /bin/openssl"
28- export LD_LIBRARY_PATH=" ../src/.libs:${OPENSSL_PATH} /lib64:${OPENSSL_PATH} /lib"
29- else
30- OPENSSL=openssl
31- fi
23+ # Use the configured OpenSSL library path if found
24+ OPENSSL_LIBDIR=$( pkg-config --variable=libdir --silence-errors openssl)
25+ if test -n " ${OPENSSL_LIBDIR} " ; then
26+ export LD_LIBRARY_PATH=" ${OPENSSL_LIBDIR}${LD_LIBRARY_PATH: +: $LD_LIBRARY_PATH } "
27+ fi
28+
29+ # Use the configured OpenSSL executable path if found
30+ OPENSSL_PREFIX=$( pkg-config --variable=prefix --silence-errors openssl)
31+ if test -n " ${OPENSSL_PREFIX} " ; then
32+ OPENSSL=$( PATH=" ${OPENSSL_PREFIX} /bin:${PATH} " command -v openssl 2> /dev/null || echo openssl)
3233else
3334 OPENSSL=openssl
3435fi
35- echo " Compiled with: ` ${OPENSSL} version` "
36+
37+ # Use the compiled and not the installed libp11.so
38+ export LD_LIBRARY_PATH=" $( pwd) /../src/.libs${LD_LIBRARY_PATH: +: $LD_LIBRARY_PATH } "
39+
40+ echo " Compiled with: $( ${OPENSSL} version) "
You can’t perform that action at this time.
0 commit comments