... | ... |
@@ -32,7 +32,7 @@ clamsubmit_SOURCES = \ |
32 | 32 |
AM_CFLAGS=@WERR_CFLAGS@ @CLAMSUBMIT_CFLAGS@ |
33 | 33 |
DEFS = @DEFS@ -DCL_NOTHREADS |
34 | 34 |
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav @SSL_CPPFLAGS@ @JSON_CPPFLAGS@ @PCRE_CPPFLAGS@ |
35 |
-LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMSUBMIT_LIBS@ @THREAD_LIBS@ |
|
35 |
+LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMSUBMIT_LIBS@ @THREAD_LIBS@ @JSON_LIBS@ |
|
36 | 36 |
|
37 | 37 |
AM_INSTALLCHECK_STD_OPTIONS_EXEMPT=clamsubmit$(EXEEXT) |
38 | 38 |
CLEANFILES=*.gcda *.gcno |
... | ... |
@@ -354,7 +354,7 @@ LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ |
354 | 354 |
LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ |
355 | 355 |
LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ |
356 | 356 |
LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ |
357 |
-LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMSUBMIT_LIBS@ @THREAD_LIBS@ |
|
357 |
+LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMSUBMIT_LIBS@ @THREAD_LIBS@ @JSON_LIBS@ |
|
358 | 358 |
LIBTOOL = @LIBTOOL@ |
359 | 359 |
LIPO = @LIPO@ |
360 | 360 |
LN_S = @LN_S@ |
... | ... |
@@ -24212,11 +24212,7 @@ fi |
24212 | 24212 |
|
24213 | 24213 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LFS safe fts implementation" >&5 |
24214 | 24214 |
$as_echo_n "checking LFS safe fts implementation... " >&6; } |
24215 |
-if test "$cross_compiling" = yes; then : |
|
24216 |
- have_LFS_fts=no |
|
24217 |
- |
|
24218 |
-else |
|
24219 |
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
24215 |
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
24220 | 24216 |
/* end confdefs.h. */ |
24221 | 24217 |
|
24222 | 24218 |
#include <fts.h> |
... | ... |
@@ -24228,15 +24224,12 @@ int main(void) { |
24228 | 24228 |
} |
24229 | 24229 |
|
24230 | 24230 |
_ACEOF |
24231 |
-if ac_fn_c_try_run "$LINENO"; then : |
|
24231 |
+if ac_fn_c_try_compile "$LINENO"; then : |
|
24232 | 24232 |
have_LFS_fts=yes |
24233 | 24233 |
else |
24234 | 24234 |
have_LFS_fts=no |
24235 | 24235 |
fi |
24236 |
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
|
24237 |
- conftest.$ac_objext conftest.beam conftest.$ac_ext |
|
24238 |
-fi |
|
24239 |
- |
|
24236 |
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
|
24240 | 24237 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_LFS_fts" >&5 |
24241 | 24238 |
$as_echo "$have_LFS_fts" >&6; } |
24242 | 24239 |
if test "x$have_LFS_fts" = "xyes"; then |
... | ... |
@@ -24600,28 +24593,37 @@ $as_echo_n "checking for libcurl installation... " >&6; } |
24600 | 24600 |
# Check whether --with-libcurl was given. |
24601 | 24601 |
if test "${with_libcurl+set}" = set; then : |
24602 | 24602 |
withval=$with_libcurl; |
24603 |
-if test "$withval"; then |
|
24604 |
- LIBCURL_HOME="$withval" |
|
24605 |
-fi |
|
24606 |
- |
|
24603 |
+find_curl="no" |
|
24604 |
+if test "X$withval" = "Xyes"; then |
|
24605 |
+ find_curl="yes" |
|
24607 | 24606 |
else |
24608 |
- |
|
24609 |
-LIBCURL_HOME=/usr/local |
|
24610 |
-if test ! -f "$LIBCURL_HOME/include/curl/curl.h" |
|
24611 |
-then |
|
24612 |
- LIBCURL_HOME=/usr |
|
24607 |
+ if test "X$withval" != "Xno"; then |
|
24608 |
+ LIBCURL_HOME="$withval" |
|
24609 |
+ fi |
|
24613 | 24610 |
fi |
24614 |
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBCURL_HOME" >&5 |
|
24615 |
-$as_echo "$LIBCURL_HOME" >&6; } |
|
24616 | 24611 |
|
24612 |
+else |
|
24613 |
+ find_curl="yes" |
|
24617 | 24614 |
fi |
24618 | 24615 |
|
24619 | 24616 |
|
24620 |
-if test ! -f "$LIBCURL_HOME/include/curl/curl.h" |
|
24621 |
-then |
|
24622 |
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcurl not found. Please use the web interface for submitting FPs/FNs." >&5 |
|
24623 |
-$as_echo "$as_me: WARNING: libcurl not found. Please use the web interface for submitting FPs/FNs." >&2;} |
|
24617 |
+if test "X$find_curl" = "Xyes"; then |
|
24618 |
+ LIBCURL_HOME=/usr/local |
|
24619 |
+fi |
|
24620 |
+if test -f "$LIBCURL_HOME/include/curl/curl.h"; then |
|
24621 |
+ have_curl="yes" |
|
24624 | 24622 |
else |
24623 |
+ if test "X$find_curl" = "Xyes"; then |
|
24624 |
+ LIBCURL_HOME=/usr |
|
24625 |
+ if test -f "$LIBCURL_HOME/include/curl/curl.h"; then |
|
24626 |
+ have_curl="yes" |
|
24627 |
+ fi |
|
24628 |
+ fi |
|
24629 |
+fi |
|
24630 |
+ |
|
24631 |
+if test "X$have_curl" = "Xyes"; then |
|
24632 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBCURL_HOME" >&5 |
|
24633 |
+$as_echo "$LIBCURL_HOME" >&6; } |
|
24625 | 24634 |
if test -f "$LIBCURL_HOME/bin/curl-config"; then |
24626 | 24635 |
CURL_LDFLAGS=$($LIBCURL_HOME/bin/curl-config --libs) |
24627 | 24636 |
CURL_CPPFLAGS=$($LIBCURL_HOME/bin/curl-config --cflags) |
... | ... |
@@ -24634,7 +24636,6 @@ else |
24634 | 24634 |
CURL_CPPFLAGS="" |
24635 | 24635 |
fi |
24636 | 24636 |
fi |
24637 |
- |
|
24638 | 24637 |
save_LDFLAGS="$LDFLAGS" |
24639 | 24638 |
LDFLAGS="$CURL_LDFLAGS" |
24640 | 24639 |
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_init in -lcurl" >&5 |
... | ... |
@@ -24681,6 +24682,9 @@ $as_echo "$as_me: WARNING: Your libcurl is misconfigured. Please use the web int |
24681 | 24681 |
fi |
24682 | 24682 |
|
24683 | 24683 |
LDFLAGS="$save_LDFLAGS" |
24684 |
+else |
|
24685 |
+ { $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 |
|
24686 |
+$as_echo "$as_me: WARNING: libcurl not found or not requested by ./configure. Please use the web interface for submitting FPs/FNs." >&2;} |
|
24684 | 24687 |
fi |
24685 | 24688 |
|
24686 | 24689 |
|
... | ... |
@@ -27622,7 +27626,7 @@ else |
27622 | 27622 |
ENABLE_YARA_FALSE= |
27623 | 27623 |
fi |
27624 | 27624 |
|
27625 |
- if test "X$have_curl" = "Xyes" && test "X$have_json" = "Xyes"; then |
|
27625 |
+ if test "X$have_curl" != "Xno" && test "X$have_json" != "Xno"; then |
|
27626 | 27626 |
ENABLE_CLAMSUBMIT_TRUE= |
27627 | 27627 |
ENABLE_CLAMSUBMIT_FALSE='#' |
27628 | 27628 |
else |
... | ... |
@@ -202,7 +202,7 @@ AM_CONDITIONAL([ENABLE_LLVM], |
202 | 202 |
AM_CONDITIONAL([ENABLE_YARA], |
203 | 203 |
[test "$enable_yara" != "no"]) |
204 | 204 |
AM_CONDITIONAL([ENABLE_CLAMSUBMIT], |
205 |
- [test "X$have_curl" = "Xyes" && test "X$have_json" = "Xyes"]) |
|
205 |
+ [test "X$have_curl" != "Xno" && test "X$have_json" != "Xno"]) |
|
206 | 206 |
no_recursion="yes"; |
207 | 207 |
|
208 | 208 |
AC_OUTPUT([libclamav/Makefile]) |
... | ... |
@@ -6,22 +6,33 @@ AC_ARG_WITH([libcurl], |
6 | 6 |
[AS_HELP_STRING([--with-libcurl@<:@=DIR@:>@], [path to directory containing libcurl |
7 | 7 |
@<:@default=/usr/local or /usr if not found in /usr/local@:>@])], |
8 | 8 |
[ |
9 |
-if test "$withval"; then |
|
10 |
- LIBCURL_HOME="$withval" |
|
11 |
-fi |
|
12 |
-], [ |
|
13 |
-LIBCURL_HOME=/usr/local |
|
14 |
-if test ! -f "$LIBCURL_HOME/include/curl/curl.h" |
|
15 |
-then |
|
16 |
- LIBCURL_HOME=/usr |
|
9 |
+find_curl="no" |
|
10 |
+if test "X$withval" = "Xyes"; then |
|
11 |
+ find_curl="yes" |
|
12 |
+else |
|
13 |
+ if test "X$withval" != "Xno"; then |
|
14 |
+ LIBCURL_HOME="$withval" |
|
15 |
+ fi |
|
17 | 16 |
fi |
18 |
-AC_MSG_RESULT([$LIBCURL_HOME]) |
|
19 |
-]) |
|
17 |
+], |
|
18 |
+[find_curl="yes"]) |
|
20 | 19 |
|
21 |
-if test ! -f "$LIBCURL_HOME/include/curl/curl.h" |
|
22 |
-then |
|
23 |
- AC_MSG_WARN([libcurl not found. Please use the web interface for submitting FPs/FNs.]) |
|
20 |
+if test "X$find_curl" = "Xyes"; then |
|
21 |
+ LIBCURL_HOME=/usr/local |
|
22 |
+fi |
|
23 |
+if test -f "$LIBCURL_HOME/include/curl/curl.h"; then |
|
24 |
+ have_curl="yes" |
|
24 | 25 |
else |
26 |
+ if test "X$find_curl" = "Xyes"; then |
|
27 |
+ LIBCURL_HOME=/usr |
|
28 |
+ if test -f "$LIBCURL_HOME/include/curl/curl.h"; then |
|
29 |
+ have_curl="yes" |
|
30 |
+ fi |
|
31 |
+ fi |
|
32 |
+fi |
|
33 |
+ |
|
34 |
+if test "X$have_curl" = "Xyes"; then |
|
35 |
+ AC_MSG_RESULT([$LIBCURL_HOME]) |
|
25 | 36 |
if test -f "$LIBCURL_HOME/bin/curl-config"; then |
26 | 37 |
CURL_LDFLAGS=$($LIBCURL_HOME/bin/curl-config --libs) |
27 | 38 |
CURL_CPPFLAGS=$($LIBCURL_HOME/bin/curl-config --cflags) |
... | ... |
@@ -34,12 +45,13 @@ else |
34 | 34 |
CURL_CPPFLAGS="" |
35 | 35 |
fi |
36 | 36 |
fi |
37 |
- |
|
38 | 37 |
save_LDFLAGS="$LDFLAGS" |
39 | 38 |
LDFLAGS="$CURL_LDFLAGS" |
40 | 39 |
AC_CHECK_LIB([curl], [curl_easy_init], [curl_msg="";have_curl="yes";CLAMSUBMIT_LIBS="$CLAMSUBMIT_LIBS $CURL_LDFLAGS";CLAMSUBMIT_CFLAGS="$CLAMSUBMIT_CFLAGS $CURL_CPPFLAGS"], |
41 |
- [AC_MSG_WARN([Your libcurl is misconfigured. Please use the web interface for submitting FPs/FNs.])], [$CURL_LDFLAGS]) |
|
40 |
+ [AC_MSG_WARN([Your libcurl is misconfigured. Please use the web interface for submitting FPs/FNs.])], [$CURL_LDFLAGS]) |
|
42 | 41 |
LDFLAGS="$save_LDFLAGS" |
42 |
+else |
|
43 |
+ AC_MSG_WARN([libcurl not found or not requested by ./configure. Please use the web interface for submitting FPs/FNs.]) |
|
43 | 44 |
fi |
44 | 45 |
|
45 | 46 |
AC_SUBST([CLAMSUBMIT_LIBS]) |