Browse code

bb11548 - fix clamsubmit autotool dependency on libjson.

Steven Morgan authored on 2017/02/09 03:39:21
Showing 2 changed files
... ...
@@ -635,7 +635,9 @@ ac_includes_default="\
635 635
 #endif"
636 636
 
637 637
 enable_option_checking=no
638
-ac_subst_vars='ENABLE_YARA_FALSE
638
+ac_subst_vars='ENABLE_CLAMSUBMIT_FALSE
639
+ENABLE_CLAMSUBMIT_TRUE
640
+ENABLE_YARA_FALSE
639 641
 ENABLE_YARA_TRUE
640 642
 ENABLE_LLVM_FALSE
641 643
 ENABLE_LLVM_TRUE
... ...
@@ -692,8 +694,6 @@ LIBPRELUDE_CFLAGS
692 692
 LIBPRELUDE_CONFIG
693 693
 ENABLE_LIBFRESHCLAM_FALSE
694 694
 ENABLE_LIBFRESHCLAM_TRUE
695
-ENABLE_CLAMSUBMIT_FALSE
696
-ENABLE_CLAMSUBMIT_TRUE
697 695
 HAVE_YARA
698 696
 subdirs
699 697
 llvmconfig
... ...
@@ -18718,9 +18718,9 @@ then
18718 18718
     as_fn_error $? "Please install zlib and zlib-devel packages" "$LINENO" 5
18719 18719
 else
18720 18720
 
18721
-    vuln=`grep "ZLIB_VERSION \"1.2.0" $ZLIB_HOME/include/zlib.h`
18721
+    vuln=`grep "ZLIB_VERSION \"1.2.0\"" $ZLIB_HOME/include/zlib.h`
18722 18722
     if test -z "$vuln"; then
18723
-	vuln=`grep "ZLIB_VERSION \"1.2.1" $ZLIB_HOME/include/zlib.h`
18723
+	vuln=`grep "ZLIB_VERSION \"1.2.1\"" $ZLIB_HOME/include/zlib.h`
18724 18724
     fi
18725 18725
 
18726 18726
     if test -n "$vuln"; then
... ...
@@ -27315,6 +27315,14 @@ else
27315 27315
   ENABLE_YARA_FALSE=
27316 27316
 fi
27317 27317
 
27318
+ if test "X$have_curl" = "Xyes" && test "X$have_json" = "Xyes"; then
27319
+  ENABLE_CLAMSUBMIT_TRUE=
27320
+  ENABLE_CLAMSUBMIT_FALSE='#'
27321
+else
27322
+  ENABLE_CLAMSUBMIT_TRUE='#'
27323
+  ENABLE_CLAMSUBMIT_FALSE=
27324
+fi
27325
+
27318 27326
 no_recursion="yes";
27319 27327
 
27320 27328
 ac_config_files="$ac_config_files libclamav/Makefile"
... ...
@@ -27554,6 +27562,10 @@ if test -z "${ENABLE_YARA_TRUE}" && test -z "${ENABLE_YARA_FALSE}"; then
27554 27554
   as_fn_error $? "conditional \"ENABLE_YARA\" was never defined.
27555 27555
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
27556 27556
 fi
27557
+if test -z "${ENABLE_CLAMSUBMIT_TRUE}" && test -z "${ENABLE_CLAMSUBMIT_FALSE}"; then
27558
+  as_fn_error $? "conditional \"ENABLE_CLAMSUBMIT\" was never defined.
27559
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
27560
+fi
27557 27561
 
27558 27562
 : "${CONFIG_STATUS=./config.status}"
27559 27563
 ac_write_fail=0
... ...
@@ -30003,19 +30015,35 @@ else
30003 30003
   $as_echo "yes ($have_milter)"
30004 30004
 fi
30005 30005
 
30006
+if test "X$have_curl" = "Xyes" && test "X$have_json" = "Xyes"; then
30006 30007
 
30007 30008
 
30008 30009
    $as_echo_n "              clamsubmit  : "
30009
-   if test "x$curl_msg" = "xno"; then :
30010
-  $as_echo "$have_curl (disabled)"
30011
-elif test "x$curl_msg" = "xyes"; then :
30012
-  $as_echo "$have_curl"
30013
-elif test "x$curl_msg" = "x"; then :
30014
-  $as_echo "$have_curl"
30010
+   if test "xyes" = "xno"; then :
30011
+  $as_echo "yes (disabled)"
30012
+elif test "xyes" = "xyes"; then :
30013
+  $as_echo "yes"
30014
+elif test "xyes" = "x"; then :
30015
+  $as_echo "yes"
30015 30016
 else
30016
-  $as_echo "$have_curl ($curl_msg)"
30017
+  $as_echo "yes (yes)"
30017 30018
 fi
30018 30019
 
30020
+else
30021
+
30022
+
30023
+   $as_echo_n "              clamsubmit  : "
30024
+   if test "xno" = "xno"; then :
30025
+  $as_echo "no (disabled)"
30026
+elif test "xno" = "xyes"; then :
30027
+  $as_echo "no"
30028
+elif test "xno" = "x"; then :
30029
+  $as_echo "no"
30030
+else
30031
+  $as_echo "no (no)"
30032
+fi
30033
+
30034
+fi
30019 30035
 
30020 30036
 { $as_echo "$as_me:${as_lineno-$LINENO}: Summary of engine performance features" >&5
30021 30037
 $as_echo "$as_me: Summary of engine performance features" >&6;}
... ...
@@ -199,6 +199,8 @@ AM_CONDITIONAL([ENABLE_LLVM],
199 199
 	       [test "$subdirfailed" != "yes" && test "$enable_llvm" != "no"])
200 200
 AM_CONDITIONAL([ENABLE_YARA],
201 201
 	       [test "$enable_yara" != "no"])
202
+AM_CONDITIONAL([ENABLE_CLAMSUBMIT],
203
+	       [test "X$have_curl" = "Xyes" && test "X$have_json" = "Xyes"])
202 204
 no_recursion="yes";
203 205
 
204 206
 AC_OUTPUT([libclamav/Makefile])
... ...
@@ -229,7 +231,11 @@ CL_MSG_STATUS([IPv6        ],[$have_cv_ipv6],[$want_ipv6])
229 229
 AC_MSG_NOTICE([Summary of optional tools])
230 230
 CL_MSG_STATUS([clamdtop    ],[$CURSES_LIBS],[$enable_clamdtop])
231 231
 CL_MSG_STATUS([milter      ],[yes],[$have_milter])
232
-CL_MSG_STATUS([clamsubmit  ],[$have_curl],[$curl_msg])
232
+if test "X$have_curl" = "Xyes" && test "X$have_json" = "Xyes"; then
233
+    CL_MSG_STATUS([clamsubmit  ], [yes], [yes])
234
+else
235
+    CL_MSG_STATUS([clamsubmit  ], [no], [no])
236
+fi
233 237
 
234 238
 AC_MSG_NOTICE([Summary of engine performance features])
235 239
 if test "x$enable_debug" = "xyes"; then