1From 1ab6e3fc3cf61fa5a7b7363e59095e868474524b Mon Sep 17 00:00:00 2001 2From: Giulio Benetti <giulio.benetti@micronovasrl.com> 3Date: Mon, 15 Oct 2018 19:34:26 +0200 4Subject: [PATCH 2/2] configure: fix AC_CHECK_FUNCS(TLS_method TLSv1_method 5 ...) failure on static linking 6 7If building as static lib, AC_CHECK_FUNCS(TLS_method TLSv1_method ...) 8fails due to missing -lz in $LIBS. 9At the moment, $LIBS contains "-lssl $LIBCRYPTO" only discarding 10previous $LIBS content. 11 12Add $LIBS to: 13LIBS="-lssl $LIBCRYPTO" 14as: 15LIBS="-lssl $LIBCRYPTO $LIBS" 16This way $LIBS will contain -lz at the end of linking command that in 17static linking build is mandatory. 18 19Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> 20--- 21 configure.d/config_os_libs2 | 2 +- 22 1 file changed, 1 insertion(+), 1 deletion(-) 23 24diff --git a/configure.d/config_os_libs2 b/configure.d/config_os_libs2 25index 93044000b..c811c63ec 100644 26--- a/configure.d/config_os_libs2 27+++ b/configure.d/config_os_libs2 28@@ -349,7 +349,7 @@ if test "x$tryopenssl" != "xno" -a "x$tryopenssl" != "xinternal"; then 29 LIBS="$netsnmp_save_LIBS" 30 fi 31 netsnmp_save_LIBS="$LIBS" 32- LIBS="-lssl $LIBCRYPTO" 33+ LIBS="-lssl $LIBCRYPTO $LIBS" 34 AC_CHECK_FUNCS([TLS_method TLSv1_method DTLS_method DTLSv1_method]dnl 35 [SSL_library_init SSL_load_error_strings]dnl 36 [ERR_get_error_all]) 37-- 382.17.1 39 40