Browse code

bb12234: Fix for oversight in libjson and libcurl detection code, so that --with-json=<path> will work.

Micah Snyder authored on 2018/12/11 03:27:29
Showing 4 changed files
... ...
@@ -29,13 +29,17 @@ To address this issue, the internal `cltypes.h` header has been replaced by
29 29
 a `clamav-types.h` that is generated on `./configure` and will be installed
30 30
 alongside `clamav.h`.
31 31
 
32
-Additional Changes:
32
+### Other changes
33
+
33 34
 - Increased the default CommandReadTimeout to reduce the chance of mail loss
34 35
   if using clamav-milter with the TCP socket. Contribution by Scott Kitterman.
36
+- Fixes for `--with-libjson` and `--with-libcurl` to correctly accept library
37
+  install path arguments.
35 38
 
36 39
 ### Acknowledgements
37 40
 
38 41
 The ClamAV team thanks the following individuals for their code submissions:
42
+
39 43
 - Scott Kitterman
40 44
 
41 45
 ## 0.101.0
... ...
@@ -22235,7 +22235,10 @@ if test "X$withval" = "Xyes"; then
22235 22235
     find_json="yes"
22236 22236
 else
22237 22237
     if test "X$withval" != "Xno"; then
22238
-        LIBJSON_HOME="$withval"
22238
+        if test -f "${withval}/include/json/json.h" -o -f "${withval}/include/json-c/json.h"; then
22239
+            LIBJSON_HOME="$withval"
22240
+            have_json_header="yes"
22241
+        fi
22239 22242
     fi
22240 22243
 fi
22241 22244
 
... ...
@@ -28844,7 +28847,10 @@ if test "X$withval" = "Xyes"; then
28844 28844
     find_curl="yes"
28845 28845
 else
28846 28846
     if test "X$withval" != "Xno"; then
28847
-        LIBCURL_HOME="$withval"
28847
+        if test -f "${withval}/bin/curl-config"; then
28848
+            LIBCURL_HOME="$withval"
28849
+            have_curl="yes"
28850
+        fi
28848 28851
     fi
28849 28852
 fi
28850 28853
 
... ...
@@ -12,7 +12,10 @@ if test "X$withval" = "Xyes"; then
12 12
     find_curl="yes"
13 13
 else
14 14
     if test "X$withval" != "Xno"; then
15
-        LIBCURL_HOME="$withval"
15
+        if test -f "${withval}/bin/curl-config"; then
16
+            LIBCURL_HOME="$withval"
17
+            have_curl="yes"
18
+        fi
16 19
     fi
17 20
 fi
18 21
 ],
... ...
@@ -12,7 +12,10 @@ if test "X$withval" = "Xyes"; then
12 12
     find_json="yes"
13 13
 else
14 14
     if test "X$withval" != "Xno"; then
15
-        LIBJSON_HOME="$withval"
15
+        if test -f "${withval}/include/json/json.h" -o -f "${withval}/include/json-c/json.h"; then
16
+            LIBJSON_HOME="$withval"
17
+            have_json_header="yes"
18
+        fi
16 19
     fi
17 20
 fi
18 21
 ],