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