... | ... |
@@ -127,18 +127,13 @@ m4_include([m4/reorganization/sha_collect.m4]) |
127 | 127 |
m4_include([m4/reorganization/yara.m4]) |
128 | 128 |
m4_include([m4/reorganization/code_checks/fts.m4]) |
129 | 129 |
m4_include([m4/reorganization/libfreshclam.m4]) |
130 |
- |
|
131 | 130 |
m4_include([m4/reorganization/prelude.m4]) |
132 |
- |
|
133 | 131 |
m4_include([m4/reorganization/bsd.m4]) |
134 | 132 |
|
135 | 133 |
dnl Freshclam dependencies |
136 | 134 |
m4_include([m4/reorganization/libs/curl.m4]) |
137 |
- |
|
138 | 135 |
m4_include([m4/reorganization/substitutions.m4]) |
139 |
- |
|
140 | 136 |
m4_include([m4/reorganization/libmspack.m4]) |
141 |
- |
|
142 | 137 |
m4_include([m4/reorganization/strni.m4]) |
143 | 138 |
|
144 | 139 |
if test "x$use_internal_mspack" = "xyes"; then |
... | ... |
@@ -236,9 +231,17 @@ AC_MSG_NOTICE([Summary of optional tools]) |
236 | 236 |
CL_MSG_STATUS([clamdtop ],[$CURSES_LIBS],[$enable_clamdtop]) |
237 | 237 |
CL_MSG_STATUS([milter ],[yes],[$have_milter]) |
238 | 238 |
if test "X$have_curl" = "Xyes" && test "X$have_json" = "Xyes"; then |
239 |
- CL_MSG_STATUS([clamsubmit ], [yes], [yes]) |
|
239 |
+ CL_MSG_STATUS([clamsubmit ], [yes (libjson-c-dev found at $LIBJSON_HOME), libcurl-devel found at $LIBCURL_HOME)], [yes]) |
|
240 | 240 |
else |
241 |
- CL_MSG_STATUS([clamsubmit ], [no], [no]) |
|
241 |
+ if test "X$have_curl" != "Xyes" && test "X$have_json" != "Xyes"; then |
|
242 |
+ CL_MSG_STATUS([clamsubmit ], [no (missing libjson-c-dev AND libcurl-devel. Use the website to submit FPs/FNs.)], [no]) |
|
243 |
+ else |
|
244 |
+ if test "X$have_curl" = "Xyes"; then |
|
245 |
+ CL_MSG_STATUS([clamsubmit ], [no (missing libjson-c-dev. Use the website to submit FPs/FNs.)], [no]) |
|
246 |
+ else |
|
247 |
+ CL_MSG_STATUS([clamsubmit ], [no (missing libcurl-devel. Use the website to submit FPs/FNs.)], [no]) |
|
248 |
+ fi |
|
249 |
+ fi |
|
242 | 250 |
fi |
243 | 251 |
|
244 | 252 |
AC_MSG_NOTICE([Summary of engine performance features]) |
... | ... |
@@ -254,9 +257,9 @@ fi |
254 | 254 |
if test "$enable_llvm" = "no"; then |
255 | 255 |
CL_MSG_STATUS([llvm ],[$have_jit],[$enable_llvm]) |
256 | 256 |
elif test "x$llvm_linking" = "x"; then |
257 |
- CL_MSG_STATUS([llvm ],[$have_jit($llvmver), from $system_llvm],[$enable_llvm]) |
|
257 |
+ CL_MSG_STATUS([llvm ],[$have_jit ($llvmver), from $system_llvm],[$enable_llvm]) |
|
258 | 258 |
else |
259 |
- CL_MSG_STATUS([llvm ],[$have_jit($llvmver), from $system_llvm ($llvm_linking)],[$enable_llvm]) |
|
259 |
+ CL_MSG_STATUS([llvm ],[$have_jit ($llvmver), from $system_llvm ($llvm_linking)],[$enable_llvm]) |
|
260 | 260 |
fi |
261 | 261 |
CL_MSG_STATUS([mempool ],[$have_mempool],[$enable_mempool]) |
262 | 262 |
|
... | ... |
@@ -264,9 +267,10 @@ AC_MSG_NOTICE([Summary of engine detection features]) |
264 | 264 |
CL_MSG_STATUS([bzip2 ],[$bzip_check],[$want_bzip2]) |
265 | 265 |
CL_MSG_STATUS([zlib ],[$ZLIB_HOME],[yes]) |
266 | 266 |
CL_MSG_STATUS([unrar ],[$want_unrar],[$want_unrar]) |
267 |
-if test "x$LIBJSON_HOME" != "x"; then |
|
268 |
- CL_MSG_STATUS([libjson ],[$LIBJSON_HOME],[$have_json]) |
|
269 |
- CL_MSG_STATUS([preclass ],[$LIBJSON_HOME],[$have_json]) |
|
267 |
+if test "X$have_json" = "Xyes"; then |
|
268 |
+ CL_MSG_STATUS([preclass ],[yes (libjson-c-dev found at $LIBJSON_HOME)],[yes]) |
|
269 |
+else |
|
270 |
+ CL_MSG_STATUS([preclass ],[no (missing libjson-c-dev)],[no]) |
|
270 | 271 |
fi |
271 | 272 |
if test "x$PCRE_HOME" = "x"; then |
272 | 273 |
CL_MSG_STATUS([pcre ],[no],[$have_pcre]) |
... | ... |
@@ -1,92 +1,86 @@ |
1 | 1 |
dnl Check for libjson |
2 | 2 |
|
3 |
+have_json_header="no" |
|
4 |
+AC_MSG_CHECKING([for libjson installation]) |
|
5 |
+ |
|
3 | 6 |
AC_ARG_WITH([libjson], |
4 | 7 |
[AS_HELP_STRING([--with-libjson@<:@=DIR@:>@], [path to directory containing libjson |
5 | 8 |
@<:@default=/usr/local or /usr if not found in /usr/local@:>@])], |
6 | 9 |
[ |
7 |
-AC_MSG_CHECKING([for libjson installation]) |
|
8 |
-if test "X$withval" != "Xyes" |
|
9 |
-then |
|
10 |
- LIBJSON_HOME="$withval" |
|
11 |
- if test -f "$LIBJSON_HOME/include/json/json.h" -o -f "$LIBJSON_HOME/include/json-c/json.h" |
|
12 |
- then |
|
13 |
- have_json_header="yes" |
|
14 |
- fi |
|
10 |
+find_json="no" |
|
11 |
+if test "X$withval" = "Xyes"; then |
|
12 |
+ find_json="yes" |
|
15 | 13 |
else |
16 |
- LIBJSON_HOME=/usr/local |
|
17 |
- if test -f "$LIBJSON_HOME/include/json/json.h" -o -f "$LIBJSON_HOME/include/json-c/json.h" |
|
18 |
- then |
|
19 |
- have_json_header="yes" |
|
20 |
- else |
|
21 |
- LIBJSON_HOME=/usr |
|
22 |
- if test -f "$LIBJSON_HOME/include/json/json.h" -o -f "$LIBJSON_HOME/include/json-c/json.h" |
|
23 |
- then |
|
24 |
- have_json_header="yes" |
|
25 |
- else |
|
26 |
- have_json_header="no" |
|
27 |
- LIBJSON_HOME="" |
|
14 |
+ if test "X$withval" != "Xno"; then |
|
15 |
+ LIBJSON_HOME="$withval" |
|
28 | 16 |
fi |
29 |
- fi |
|
30 | 17 |
fi |
31 |
-if test "X$have_json_header" != "Xyes" |
|
32 |
-then |
|
33 |
- AC_MSG_ERROR([unable to find json includes.]) |
|
34 |
-fi |
|
35 |
-AC_MSG_RESULT([$LIBJSON_HOME]) |
|
36 | 18 |
], |
37 |
-[ |
|
38 |
-have_json_header="no" |
|
39 |
-]) |
|
19 |
+[find_json="yes"]) |
|
40 | 20 |
|
41 |
-if test "X$have_json_header" = "Xyes" |
|
42 |
-then |
|
43 |
- if test -f "$LIBJSON_HOME/include/json/json.h" |
|
44 |
- then |
|
45 |
- JSON_INCLUDE="include/json" |
|
46 |
- fi |
|
47 |
- if test -f "$LIBJSON_HOME/include/json-c/json.h" |
|
48 |
- then |
|
49 |
- JSON_INCLUDE="include/json-c" |
|
50 |
- fi |
|
51 |
- if test -z $JSON_INCLUDE |
|
52 |
- then |
|
53 |
- AC_MSG_WARN([json header lost.]) |
|
54 |
- fi |
|
21 |
+if test "X$find_json" = "Xyes"; then |
|
22 |
+ LIBJSON_HOME=/usr/local |
|
23 |
+fi |
|
55 | 24 |
|
56 |
- JSON_CPPFLAGS="-I$LIBJSON_HOME/$JSON_INCLUDE" |
|
57 |
- save_LDFLAGS="$LDFLAGS" |
|
58 |
- save_CFLAGS="$CFLAGS" |
|
59 |
- save_LIBS="$LIBS" |
|
60 |
- LIBS="" |
|
61 |
- JSON_LIBS="" |
|
62 |
- if test "$LIBJSON_HOME" != "/usr" |
|
63 |
- then |
|
64 |
- JSON_LDFLAGS="-L$LIBJSON_HOME/lib" |
|
65 |
- LDFLAGS="$LDFLAGS $JSON_LDFLAGS" |
|
66 |
- CFLAGS="$CFLAGS $JSON_CPPFLAGS" |
|
67 |
- fi |
|
25 |
+if test -f "$LIBJSON_HOME/include/json/json.h" -o -f "$LIBJSON_HOME/include/json-c/json.h"; then |
|
26 |
+ have_json_header="yes" |
|
27 |
+else |
|
28 |
+ if test "X$find_json" = "Xyes"; then |
|
29 |
+ LIBJSON_HOME=/usr |
|
30 |
+ if test -f "$LIBJSON_HOME/include/json/json.h" -o -f "$LIBJSON_HOME/include/json-c/json.h"; then |
|
31 |
+ have_json_header="yes" |
|
32 |
+ fi |
|
33 |
+ fi |
|
34 |
+fi |
|
68 | 35 |
|
69 |
- AC_SEARCH_LIBS([json_object_object_get_ex], [json-c json], [ |
|
70 |
-have_json="yes" |
|
71 |
-have_deprecated_json="no"], [ |
|
72 |
-have_json="no" |
|
73 |
-AC_SEARCH_LIBS([json_object_object_get], [json-c json], [ |
|
74 |
-have_json="yes" |
|
75 |
-have_deprecated_json="yes" |
|
76 |
-]) |
|
77 |
-]) |
|
36 |
+if test "X$have_json_header" = "Xyes"; then |
|
37 |
+ AC_MSG_RESULT([$LIBJSON_HOME]) |
|
38 |
+ if test -f "$LIBJSON_HOME/include/json/json.h" |
|
39 |
+ then |
|
40 |
+ JSON_INCLUDE="include/json" |
|
41 |
+ fi |
|
42 |
+ if test -f "$LIBJSON_HOME/include/json-c/json.h" |
|
43 |
+ then |
|
44 |
+ JSON_INCLUDE="include/json-c" |
|
45 |
+ fi |
|
46 |
+ if test -z $JSON_INCLUDE |
|
47 |
+ then |
|
48 |
+ AC_MSG_WARN([json header lost.]) |
|
49 |
+ fi |
|
78 | 50 |
|
79 |
- CFLAGS="$save_CFLAGS" |
|
80 |
- LDFLAGS="$save_LDFLAGS" |
|
51 |
+ JSON_CPPFLAGS="-I$LIBJSON_HOME/$JSON_INCLUDE" |
|
52 |
+ save_LDFLAGS="$LDFLAGS" |
|
53 |
+ save_CFLAGS="$CFLAGS" |
|
54 |
+ save_LIBS="$LIBS" |
|
55 |
+ LIBS="" |
|
56 |
+ JSON_LIBS="" |
|
57 |
+ if test "$LIBJSON_HOME" != "/usr" |
|
58 |
+ then |
|
59 |
+ JSON_LDFLAGS="-L$LIBJSON_HOME/lib" |
|
60 |
+ LDFLAGS="$LDFLAGS $JSON_LDFLAGS" |
|
61 |
+ CFLAGS="$CFLAGS $JSON_CPPFLAGS" |
|
62 |
+ fi |
|
63 |
+ |
|
64 |
+ AC_SEARCH_LIBS([json_object_object_get_ex], [json-c json], [ |
|
65 |
+ have_json="yes" |
|
66 |
+ have_deprecated_json="no"], [ |
|
67 |
+ have_json="no" |
|
68 |
+ AC_SEARCH_LIBS([json_object_object_get], [json-c json], [ |
|
69 |
+ have_json="yes" |
|
70 |
+ have_deprecated_json="yes" |
|
71 |
+ ]) |
|
72 |
+ ]) |
|
73 |
+ |
|
74 |
+ CFLAGS="$save_CFLAGS" |
|
75 |
+ LDFLAGS="$save_LDFLAGS" |
|
81 | 76 |
fi |
82 | 77 |
|
83 | 78 |
if test "X$have_json" = "Xyes"; then |
84 |
- AC_DEFINE([HAVE_JSON],1,[Define to 1 if you have the 'libjson' library (-ljson).]) |
|
85 |
- if test "X$have_deprecated_json" = "Xyes"; then |
|
86 |
- AC_DEFINE([HAVE_DEPRECATED_JSON],1,[Define to 1 if you have a deprecated version of the 'libjson' library (-ljson).]) |
|
87 |
- fi |
|
88 |
- JSON_LIBS="$LIBS" |
|
79 |
+ AC_DEFINE([HAVE_JSON],1,[Define to 1 if you have the 'libjson' library (-ljson).]) |
|
80 |
+ if test "X$have_deprecated_json" = "Xyes"; then |
|
81 |
+ AC_DEFINE([HAVE_DEPRECATED_JSON],1,[Define to 1 if you have a deprecated version of the 'libjson' library (-ljson).]) |
|
82 |
+ fi |
|
83 |
+ JSON_LIBS="$LIBS" |
|
89 | 84 |
fi |
90 | 85 |
|
91 | 86 |
LIBS="$save_LIBS" |
92 |
- |