]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix openssl builds with custom-built library: specify most-dependent first
authorSteffan Karger <steffan@karger.me>
Sat, 28 Nov 2015 22:48:01 +0000 (23:48 +0100)
committerGert Doering <gert@greenie.muc.de>
Sun, 29 Nov 2015 12:34:53 +0000 (13:34 +0100)
Libraries should be specified from left-to-right as most-dependent to
least-dependent.  Thus, -lssl comes first, then -lcrypto.

(This does not fail when pkg-config finds your libraries for you, since
we tell it '-lssl needs -lcrypto' and we then end up with
"-lcrypto -lssl -lcrypto", which is not pretty but does work.)

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <1448750881-10767-1-git-send-email-steffan@karger.me>
URL: http://article.gmane.org/gmane.network.openvpn.devel/10649
Signed-off-by: Gert Doering <gert@greenie.muc.de>
configure.ac

index d3cacc88ad4dfa06464963e53439ec7056266ad5..a8675fedd8fdd2c6f2f64a0f027bdd872e661990 100644 (file)
@@ -1080,7 +1080,7 @@ if test "${enable_crypto}" = "yes"; then
        test "${have_crypto_crypto}" != "yes" && AC_MSG_ERROR([${with_crypto_library} crypto is required but missing])
        test "${enable_crypto_ofb_cfb}" = "yes" && AC_DEFINE([ENABLE_OFB_CFB_MODE], [1], [Enable OFB and CFB cipher modes])
        OPTIONAL_CRYPTO_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${CRYPTO_CRYPTO_CFLAGS} ${CRYPTO_SSL_CFLAGS}"
-       OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS} ${CRYPTO_CRYPTO_LIBS} ${CRYPTO_SSL_LIBS}"
+       OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS} ${CRYPTO_SSL_LIBS} ${CRYPTO_CRYPTO_LIBS}"
        AC_DEFINE([ENABLE_CRYPTO], [1], [Enable crypto library])
 fi