Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/671?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]>
---
M configure.ac
1 file changed, 14 insertions(+), 7 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/71/671/1
diff --git a/configure.ac b/configure.ac
index 555c97e..b2d27cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1000,14 +1000,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/+/671?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I5d0da76018e874cda5dbab9202a2b817ad5e4692
Gerrit-Change-Number: 671
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel