1 Fix detection of statically linked libraries
3 Patch submitted upstream: https://bugzilla.clamav.net/show_bug.cgi?id=11132
5 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
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
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"
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
26 -SSL_LIBS="-lssl -lcrypto"
27 +SSL_LIBS="-lssl -lcrypto -lz"
29 if test "$LIBSSL_HOME" != "/usr"; then
30 SSL_LDFLAGS="-L$LIBSSL_HOME/lib"
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])
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])
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])
45 LDFLAGS="$save_LDFLAGS"
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
51 save_LDFLAGS="$LDFLAGS"
52 LDFLAGS="$LDFLAGS $XML_LIBS"
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])
57 CPPFLAGS="$save_CPPFLAGS"
58 LDFLAGS="$save_LDFLAGS"