The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / clamav / 0002-static-linking.patch
1 Fix detection of statically linked libraries
2
3 Patch submitted upstream: https://bugzilla.clamav.net/show_bug.cgi?id=11132
4
5 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
6
7 diff -uNr clamav-0.98.4.org/m4/reorganization/libs/curl.m4 clamav-0.98.4/m4/reorganization/libs/curl.m4
8 --- clamav-0.98.4.org/m4/reorganization/libs/curl.m4    2014-05-21 17:25:05.000000000 +0200
9 +++ clamav-0.98.4/m4/reorganization/libs/curl.m4        2014-09-28 15:39:26.714111527 +0200
10 @@ -38,7 +38,7 @@
11      save_LDFLAGS="$LDFLAGS"
12      LDFLAGS="$CURL_LDFLAGS"
13      AC_CHECK_LIB([curl], [curl_easy_init], [curl_msg="";have_curl="yes";CLAMSUBMIT_LIBS="$CLAMSUBMIT_LIBS $CURL_LDFLAGS";CLAMSUBMIT_CFLAGS="$CLAMSUBMIT_CFLAGS $CURL_CPPFLAGS"],
14 -            [AC_MSG_WARN([Your libcurl is misconfigured. Please use the web interface for submitting FPs/FNs.])])
15 +            [AC_MSG_WARN([Your libcurl is misconfigured. Please use the web interface for submitting FPs/FNs.])], [$CURL_LDFLAGS])
16      LDFLAGS="$save_LDFLAGS"
17  fi
18  
19 diff -uNr clamav-0.98.4.org/m4/reorganization/libs/openssl.m4 clamav-0.98.4/m4/reorganization/libs/openssl.m4
20 --- clamav-0.98.4.org/m4/reorganization/libs/openssl.m4 2014-05-22 15:18:22.000000000 +0200
21 +++ clamav-0.98.4/m4/reorganization/libs/openssl.m4     2014-09-28 15:15:18.280323868 +0200
22 @@ -26,7 +26,7 @@
23  save_CFLAGS="$CFLAGS"
24  save_LIBS="$LIBS"
25  
26 -SSL_LIBS="-lssl -lcrypto"
27 +SSL_LIBS="-lssl -lcrypto -lz"
28  
29  if test "$LIBSSL_HOME" != "/usr"; then
30      SSL_LDFLAGS="-L$LIBSSL_HOME/lib"
31 @@ -41,12 +41,12 @@
32  have_ssl="no"
33  have_crypto="no"
34  
35 -AC_CHECK_LIB([ssl], [SSL_library_init], [have_ssl="yes"], [AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])], [-lcrypto])
36 +AC_CHECK_LIB([ssl], [SSL_library_init], [have_ssl="yes"], [AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])], [-lcrypto -lz])
37  
38 -AC_CHECK_LIB([crypto], [EVP_EncryptInit], [have_crypto="yes"], [AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])])
39 +AC_CHECK_LIB([crypto], [EVP_EncryptInit], [have_crypto="yes"], [AC_MSG_ERROR([Your OpenSSL installation is misconfigured or missing])], [-lcrypto -lz])
40  
41  dnl OpenSSL 0.9.8 is the minimum required version due to X509_VERIFY_PARAM
42 -AC_CHECK_LIB([ssl], [X509_VERIFY_PARAM_new], [], [AC_MSG_ERROR([Your OpenSSL installation is missing the X509_VERIFY_PARAM function. Please upgrade to a more recent version of OpenSSL.])], [-lcrypto])
43 +AC_CHECK_LIB([ssl], [X509_VERIFY_PARAM_new], [], [AC_MSG_ERROR([Your OpenSSL installation is missing the X509_VERIFY_PARAM function. Please upgrade to a more recent version of OpenSSL.])], [-lcrypto -lz])
44  
45  LDFLAGS="$save_LDFLAGS"
46  CFLAGS="$save_CFLAGS"
47 diff -uNr clamav-0.98.4.org/m4/reorganization/libs/xml.m4 clamav-0.98.4/m4/reorganization/libs/xml.m4
48 --- clamav-0.98.4.org/m4/reorganization/libs/xml.m4     2014-05-21 17:25:05.000000000 +0200
49 +++ clamav-0.98.4/m4/reorganization/libs/xml.m4 2014-09-28 15:57:41.836339462 +0200
50 @@ -67,7 +67,7 @@
51      save_LDFLAGS="$LDFLAGS"
52      LDFLAGS="$LDFLAGS $XML_LIBS"
53  
54 -    AC_CHECK_LIB([xml2], [xmlTextReaderRead], [working_xml="yes"], [working_xml="no"])
55 +    AC_CHECK_LIB([xml2], [xmlTextReaderRead], [working_xml="yes"], [working_xml="no"], [$XML_LIBS])
56  
57      CPPFLAGS="$save_CPPFLAGS"
58      LDFLAGS="$save_LDFLAGS"