mirror of
https://github.com/OpenVPN/openvpn.git
synced 2026-05-28 04:03:29 -04:00
configure: Try to use pkg-config to detect mbedTLS
mbedTLS does not seem to have pkg-config support on e.g.
Debian/Ubuntu, so we definitely need to keep the
fallback check as well.
Change-Id: I5d0da76018e874cda5dbab9202a2b817ad5e4692
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Yuriy Darnobyt <yura.uddr@gmail.com>
Message-Id: <20240906160510.76387-1-frank@lichtenheld.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg29090.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1422
(cherry picked from commit c829f57096)
Message-Id: <20251208194151.17419-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34911.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
This commit is contained in:
parent
09c35f8421
commit
40420d43a9
1 changed files with 14 additions and 7 deletions
21
configure.ac
21
configure.ac
|
|
@ -1010,14 +1010,21 @@ elif test "${with_crypto_library}" = "mbedtls"; then
|
|||
|
||||
if test -z "${MBEDTLS_CFLAGS}" -a -z "${MBEDTLS_LIBS}"; then
|
||||
# if the user did not explicitly specify flags, try to autodetect
|
||||
LIBS="${LIBS} -lmbedtls -lmbedx509 -lmbedcrypto"
|
||||
AC_CHECK_LIB(
|
||||
[mbedtls],
|
||||
[mbedtls_ssl_init],
|
||||
[MBEDTLS_LIBS="-lmbedtls -lmbedx509 -lmbedcrypto"],
|
||||
[AC_MSG_ERROR([Could not find mbed TLS.])],
|
||||
[${PKCS11_HELPER_LIBS}]
|
||||
PKG_CHECK_MODULES([MBEDTLS],
|
||||
[mbedtls >= 2.0.0 mbedx509 >= 2.0.0 mbedcrypto >= 2.0.0],
|
||||
[have_mbedtls="yes"],
|
||||
[LIBS="${LIBS} -lmbedtls -lmbedx509 -lmbedcrypto"]
|
||||
)
|
||||
# mbedtls might not have pkgconfig integration, so try manually
|
||||
if test "${have_mbedtls}" != "yes"; then
|
||||
AC_CHECK_LIB(
|
||||
[mbedtls],
|
||||
[mbedtls_ssl_init],
|
||||
[MBEDTLS_LIBS="-lmbedtls -lmbedx509 -lmbedcrypto"],
|
||||
[AC_MSG_ERROR([Could not find mbed TLS.])],
|
||||
[${PKCS11_HELPER_LIBS}]
|
||||
)
|
||||
fi
|
||||
fi
|
||||
|
||||
CFLAGS="${MBEDTLS_CFLAGS} ${PKCS11_HELPER_CFLAGS} ${CFLAGS}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue