From: Gert Doering Date: Thu, 5 May 2016 11:48:16 +0000 (+0200) Subject: Fix library order in -lmbedtls test. X-Git-Tag: v2.4_alpha1~98 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ae17b7e97881ab57352b0bd525f15e6e9b60011;p=thirdparty%2Fopenvpn.git 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 --- 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}] )