Attention is currently required from: cron2, plaisthos, uddr.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1422?usp=email
to review the following change.
Change subject: configure: Try to use pkg-config to detect mbedTLS
......................................................................
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 <[email protected]>
Acked-by: Yuriy Darnobyt <[email protected]>
Message-Id: <[email protected]>
URL:
https://www.mail-archive.com/[email protected]/msg29090.html
Signed-off-by: Gert Doering <[email protected]>
(cherry picked from commit c829f57096cb6951aa4698eff388aeebf9310334)
---
M configure.ac
1 file changed, 14 insertions(+), 7 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/22/1422/1
diff --git a/configure.ac b/configure.ac
index bf252c9..307329d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1010,14 +1010,21 @@
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}"
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1422?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: release/2.6
Gerrit-Change-Id: I5d0da76018e874cda5dbab9202a2b817ad5e4692
Gerrit-Change-Number: 1422
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: cron2 <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-Reviewer: uddr <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Attention: cron2 <[email protected]>
Gerrit-Attention: uddr <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel