bb11867/11885 - Fix clamsubmit build issues.

This commit is contained in:
Steven Morgan
2017-08-09 16:11:32 -04:00
parent 14e2247bd2
commit fb11adbbdf
5 changed files with 65 additions and 49 deletions

View File

@@ -32,7 +32,7 @@ clamsubmit_SOURCES = \
AM_CFLAGS=@WERR_CFLAGS@ @CLAMSUBMIT_CFLAGS@
DEFS = @DEFS@ -DCL_NOTHREADS
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav @SSL_CPPFLAGS@ @JSON_CPPFLAGS@ @PCRE_CPPFLAGS@
LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMSUBMIT_LIBS@ @THREAD_LIBS@
LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMSUBMIT_LIBS@ @THREAD_LIBS@ @JSON_LIBS@
AM_INSTALLCHECK_STD_OPTIONS_EXEMPT=clamsubmit$(EXEEXT)
CLEANFILES=*.gcda *.gcno

View File

@@ -354,7 +354,7 @@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@
LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@
LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@
LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@
LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMSUBMIT_LIBS@ @THREAD_LIBS@
LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMSUBMIT_LIBS@ @THREAD_LIBS@ @JSON_LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@

62
configure vendored
View File

@@ -24214,11 +24214,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LFS safe fts implementation" >&5
$as_echo_n "checking LFS safe fts implementation... " >&6; }
if test "$cross_compiling" = yes; then :
have_LFS_fts=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <fts.h>
@@ -24230,15 +24226,12 @@ int main(void) {
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
if ac_fn_c_try_compile "$LINENO"; then :
have_LFS_fts=yes
else
have_LFS_fts=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_LFS_fts" >&5
$as_echo "$have_LFS_fts" >&6; }
if test "x$have_LFS_fts" = "xyes"; then
@@ -24602,28 +24595,37 @@ $as_echo_n "checking for libcurl installation... " >&6; }
# Check whether --with-libcurl was given.
if test "${with_libcurl+set}" = set; then :
withval=$with_libcurl;
if test "$withval"; then
LIBCURL_HOME="$withval"
find_curl="no"
if test "X$withval" = "Xyes"; then
find_curl="yes"
else
if test "X$withval" != "Xno"; then
LIBCURL_HOME="$withval"
fi
fi
else
LIBCURL_HOME=/usr/local
if test ! -f "$LIBCURL_HOME/include/curl/curl.h"
then
LIBCURL_HOME=/usr
find_curl="yes"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBCURL_HOME" >&5
if test "X$find_curl" = "Xyes"; then
LIBCURL_HOME=/usr/local
fi
if test -f "$LIBCURL_HOME/include/curl/curl.h"; then
have_curl="yes"
else
if test "X$find_curl" = "Xyes"; then
LIBCURL_HOME=/usr
if test -f "$LIBCURL_HOME/include/curl/curl.h"; then
have_curl="yes"
fi
fi
fi
if test "X$have_curl" = "Xyes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBCURL_HOME" >&5
$as_echo "$LIBCURL_HOME" >&6; }
fi
if test ! -f "$LIBCURL_HOME/include/curl/curl.h"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcurl not found. Please use the web interface for submitting FPs/FNs." >&5
$as_echo "$as_me: WARNING: libcurl not found. Please use the web interface for submitting FPs/FNs." >&2;}
else
if test -f "$LIBCURL_HOME/bin/curl-config"; then
CURL_LDFLAGS=$($LIBCURL_HOME/bin/curl-config --libs)
CURL_CPPFLAGS=$($LIBCURL_HOME/bin/curl-config --cflags)
@@ -24636,7 +24638,6 @@ else
CURL_CPPFLAGS=""
fi
fi
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$CURL_LDFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_init in -lcurl" >&5
@@ -24683,6 +24684,9 @@ $as_echo "$as_me: WARNING: Your libcurl is misconfigured. Please use the web int
fi
LDFLAGS="$save_LDFLAGS"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcurl not found or not requested by ./configure. Please use the web interface for submitting FPs/FNs." >&5
$as_echo "$as_me: WARNING: libcurl not found or not requested by ./configure. Please use the web interface for submitting FPs/FNs." >&2;}
fi
@@ -27624,7 +27628,7 @@ else
ENABLE_YARA_FALSE=
fi
if test "X$have_curl" = "Xyes" && test "X$have_json" = "Xyes"; then
if test "X$have_curl" != "Xno" && test "X$have_json" != "Xno"; then
ENABLE_CLAMSUBMIT_TRUE=
ENABLE_CLAMSUBMIT_FALSE='#'
else

View File

@@ -202,7 +202,7 @@ AM_CONDITIONAL([ENABLE_LLVM],
AM_CONDITIONAL([ENABLE_YARA],
[test "$enable_yara" != "no"])
AM_CONDITIONAL([ENABLE_CLAMSUBMIT],
[test "X$have_curl" = "Xyes" && test "X$have_json" = "Xyes"])
[test "X$have_curl" != "Xno" && test "X$have_json" != "Xno"])
no_recursion="yes";
AC_OUTPUT([libclamav/Makefile])

View File

@@ -6,22 +6,33 @@ AC_ARG_WITH([libcurl],
[AS_HELP_STRING([--with-libcurl@<:@=DIR@:>@], [path to directory containing libcurl
@<:@default=/usr/local or /usr if not found in /usr/local@:>@])],
[
if test "$withval"; then
LIBCURL_HOME="$withval"
fi
], [
LIBCURL_HOME=/usr/local
if test ! -f "$LIBCURL_HOME/include/curl/curl.h"
then
LIBCURL_HOME=/usr
fi
AC_MSG_RESULT([$LIBCURL_HOME])
])
if test ! -f "$LIBCURL_HOME/include/curl/curl.h"
then
AC_MSG_WARN([libcurl not found. Please use the web interface for submitting FPs/FNs.])
find_curl="no"
if test "X$withval" = "Xyes"; then
find_curl="yes"
else
if test "X$withval" != "Xno"; then
LIBCURL_HOME="$withval"
fi
fi
],
[find_curl="yes"])
if test "X$find_curl" = "Xyes"; then
LIBCURL_HOME=/usr/local
fi
if test -f "$LIBCURL_HOME/include/curl/curl.h"; then
have_curl="yes"
else
if test "X$find_curl" = "Xyes"; then
LIBCURL_HOME=/usr
if test -f "$LIBCURL_HOME/include/curl/curl.h"; then
have_curl="yes"
fi
fi
fi
if test "X$have_curl" = "Xyes"; then
AC_MSG_RESULT([$LIBCURL_HOME])
if test -f "$LIBCURL_HOME/bin/curl-config"; then
CURL_LDFLAGS=$($LIBCURL_HOME/bin/curl-config --libs)
CURL_CPPFLAGS=$($LIBCURL_HOME/bin/curl-config --cflags)
@@ -34,12 +45,13 @@ else
CURL_CPPFLAGS=""
fi
fi
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$CURL_LDFLAGS"
AC_CHECK_LIB([curl], [curl_easy_init], [curl_msg="";have_curl="yes";CLAMSUBMIT_LIBS="$CLAMSUBMIT_LIBS $CURL_LDFLAGS";CLAMSUBMIT_CFLAGS="$CLAMSUBMIT_CFLAGS $CURL_CPPFLAGS"],
[AC_MSG_WARN([Your libcurl is misconfigured. Please use the web interface for submitting FPs/FNs.])], [$CURL_LDFLAGS])
[AC_MSG_WARN([Your libcurl is misconfigured. Please use the web interface for submitting FPs/FNs.])], [$CURL_LDFLAGS])
LDFLAGS="$save_LDFLAGS"
else
AC_MSG_WARN([libcurl not found or not requested by ./configure. Please use the web interface for submitting FPs/FNs.])
fi
AC_SUBST([CLAMSUBMIT_LIBS])