From 1ae17b7e97881ab57352b0bd525f15e6e9b60011 Mon Sep 17 00:00:00 2001 From: Gert Doering Date: Thu, 5 May 2016 13:48:16 +0200 Subject: [PATCH] Fix library order in -lmbedtls test. -lmbedx509 needs to be before -lmbedcrypto, otherwise you end up with unresolved symbols mbedtls_pk_load_file and mbedtls_pk_parse_subpubkey on systems with static mbedtls libraries and a linker that only does one left-to-right resolving pass through these. Signed-off-by: Gert Doering Acked-by: Steffan Karger Message-Id: <20160505115050.GA81579@greenie.muc.de> URL: http://article.gmane.org/gmane.network.openvpn.devel/11605 Signed-off-by: Gert Doering --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 30f6cfcbd..97ad85606 100644 --- a/configure.ac +++ b/configure.ac @@ -844,11 +844,11 @@ 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 -lmbedcrypto -lmbedx509" + LIBS="${LIBS} -lmbedtls -lmbedx509 -lmbedcrypto" AC_CHECK_LIB( [mbedtls], [mbedtls_ssl_init], - [MBEDTLS_LIBS="-lmbedtls -lmbedcrypto -lmbedx509"], + [MBEDTLS_LIBS="-lmbedtls -lmbedx509 -lmbedcrypto"], [AC_MSG_ERROR([Could not find mbed TLS.])], [${PKCS11_HELPER_LIBS}] ) -- 2.47.2