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
... ...
@@ -15,13 +15,17 @@ To address this issue, the internal `cltypes.h` header has been replaced by
15 15
 a `clamav-types.h` that is generated on `./configure` and will be installed
16 16
 alongside `clamav.h`.
17 17
 
18
-Additional Changes:
18
+### Other changes
19
+
19 20
 - Increased the default CommandReadTimeout to reduce the chance of mail loss
20 21
   if using clamav-milter with the TCP socket. Contribution by Scott Kitterman.
22
+- Fixes for `--with-libjson` and `--with-libcurl` to correctly accept library
23
+  install path arguments.
21 24
 
22 25
 ### Acknowledgements
23 26
 
24 27
 The ClamAV team thanks the following individuals for their code submissions:
28
+
25 29
 - Scott Kitterman
26 30
 
27 31
 ## 0.101.0
... ...
@@ -22210,7 +22210,10 @@ if test "X$withval" = "Xyes"; then
22210 22210
     find_json="yes"
22211 22211
 else
22212 22212
     if test "X$withval" != "Xno"; then
22213
-        LIBJSON_HOME="$withval"
22213
+        if test -f "${withval}/include/json/json.h" -o -f "${withval}/include/json-c/json.h"; then
22214
+            LIBJSON_HOME="$withval"
22215
+            have_json_header="yes"
22216
+        fi
22214 22217
     fi
22215 22218
 fi
22216 22219
 
... ...
@@ -28819,7 +28822,10 @@ if test "X$withval" = "Xyes"; then
28819 28819
     find_curl="yes"
28820 28820
 else
28821 28821
     if test "X$withval" != "Xno"; then
28822
-        LIBCURL_HOME="$withval"
28822
+        if test -f "${withval}/bin/curl-config"; then
28823
+            LIBCURL_HOME="$withval"
28824
+            have_curl="yes"
28825
+        fi
28823 28826
     fi
28824 28827
 fi
28825 28828
 
... ...
@@ -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
 ],