Re: [Openvpn-devel] [PATCH] Fix openssl builds with custom-built library: specify most-dependent first

2015-11-29 Thread Arne Schwabe
Am 28.11.15 um 23:48 schrieb Steffan Karger:
> 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.)
> 

ACK from me.

Arne




[Openvpn-devel] [PATCH] Fix openssl builds with custom-built library: specify most-dependent first

2015-11-28 Thread Steffan Karger
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 
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 40df8a1..d3b3fa9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1110,7 +1110,7 @@ if test "${enable_crypto}" = "yes"; then
test "${have_crypto_aead_modes}" != "yes" && AC_MSG_ERROR([AEAD 
modes required but missing])
fi
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

-- 
2.5.0