git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@985 77e5149b-7576-45b1-b177-96237e5ba77b
Tomasz Kojm authored on 2004/10/10 08:38:19... | ... |
@@ -1,3 +1,11 @@ |
1 |
+Sun Oct 10 01:12:04 CEST 2004 (tk) |
|
2 |
+---------------------------------- |
|
3 |
+ * configure: check libcurl's version number |
|
4 |
+ * clamd/others.c: fix compilation error on Solaris (thanks to "Christopher |
|
5 |
+ X. Candreva" <chris*westnet.com>) |
|
6 |
+ * freshclam: display additional info for "SECURITY WARNING: NO SUPPORT..." |
|
7 |
+ (requested by Kevin Spicer <kevins*bmrb.co.uk>) |
|
8 |
+ |
|
1 | 9 |
Sat Oct 9 23:11:35 BST 2004 (njh) |
2 | 10 |
---------------------------------- |
3 | 11 |
* clamav-milter: Correct fix for systems where BINDTODEVICE is not |
... | ... |
@@ -189,6 +189,9 @@ |
189 | 189 |
/* Define to 1 if you have the `strlcpy' function. */ |
190 | 190 |
#undef HAVE_STRLCPY |
191 | 191 |
|
192 |
+/* Define to 1 if you have the <sys/filio.h> header file. */ |
|
193 |
+#undef HAVE_SYS_FILIO_H |
|
194 |
+ |
|
192 | 195 |
/* Define to 1 if you have the <sys/inttypes.h> header file. */ |
193 | 196 |
#undef HAVE_SYS_INTTYPES_H |
194 | 197 |
|
... | ... |
@@ -8544,7 +8544,8 @@ fi |
8544 | 8544 |
|
8545 | 8545 |
|
8546 | 8546 |
|
8547 |
-for ac_header in stdint.h unistd.h sys/int_types.h dlfcn.h inttypes.h sys/inttypes.h memory.h ndir.h stdlib.h strings.h string.h sys/mman.h sys/param.h sys/stat.h sys/types.h malloc.h poll.h regex.h limits.h |
|
8547 |
+ |
|
8548 |
+for ac_header in stdint.h unistd.h sys/int_types.h dlfcn.h inttypes.h sys/inttypes.h memory.h ndir.h stdlib.h strings.h string.h sys/mman.h sys/param.h sys/stat.h sys/types.h malloc.h poll.h regex.h limits.h sys/filio.h |
|
8548 | 8549 |
do |
8549 | 8550 |
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
8550 | 8551 |
if eval "test \"\${$as_ac_Header+set}\" = set"; then |
... | ... |
@@ -11018,21 +11019,40 @@ fi; |
11018 | 11018 |
|
11019 | 11019 |
if test "$lcurl" != "no" |
11020 | 11020 |
then |
11021 |
- echo "$as_me:$LINENO: checking for libcurl" >&5 |
|
11022 |
-echo $ECHO_N "checking for libcurl... $ECHO_C" >&6 |
|
11021 |
+ my_cv_curl_vers=NONE |
|
11022 |
+ check="7.11.0" |
|
11023 |
+ check_hex="070B00" |
|
11024 |
+ |
|
11025 |
+ echo "$as_me:$LINENO: checking for curl >= $check" >&5 |
|
11026 |
+echo $ECHO_N "checking for curl >= $check... $ECHO_C" >&6 |
|
11027 |
+ |
|
11023 | 11028 |
if eval curl-config --version 2>/dev/null >/dev/null; then |
11029 |
+ ver=`curl-config --version | sed -e "s/libcurl //g"` |
|
11030 |
+ hex_ver=`curl-config --vernum | tr 'a-f' 'A-F'` |
|
11031 |
+ ok=`echo "ibase=16; if($hex_ver>=$check_hex) $hex_ver else 0" | bc` |
|
11032 |
+ |
|
11033 |
+ if test x$ok != x0; then |
|
11034 |
+ curl_libs=`curl-config --libs` |
|
11035 |
+ LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $curl_libs" |
|
11036 |
+ my_cv_curl_vers="$ver" |
|
11037 |
+ echo "$as_me:$LINENO: result: $my_cv_curl_vers" >&5 |
|
11038 |
+echo "${ECHO_T}$my_cv_curl_vers" >&6 |
|
11024 | 11039 |
|
11025 | 11040 |
cat >>confdefs.h <<\_ACEOF |
11026 | 11041 |
#define WITH_CURL 1 |
11027 | 11042 |
_ACEOF |
11028 | 11043 |
|
11029 |
- curl_libs=`curl-config --libs` |
|
11030 |
- LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $curl_libs" |
|
11031 |
- echo "$as_me:$LINENO: result: yes" >&5 |
|
11032 |
-echo "${ECHO_T}yes" >&6 |
|
11044 |
+ else |
|
11045 |
+ echo "$as_me:$LINENO: result: FAILED" >&5 |
|
11046 |
+echo "${ECHO_T}FAILED" >&6 |
|
11047 |
+ { echo "$as_me:$LINENO: WARNING: $ver is too old. Need version $check or higher." >&5 |
|
11048 |
+echo "$as_me: WARNING: $ver is too old. Need version $check or higher." >&2;} |
|
11049 |
+ fi |
|
11033 | 11050 |
else |
11034 |
- echo "$as_me:$LINENO: result: no" >&5 |
|
11035 |
-echo "${ECHO_T}no" >&6 |
|
11051 |
+ echo "$as_me:$LINENO: result: FAILED" >&5 |
|
11052 |
+echo "${ECHO_T}FAILED" >&6 |
|
11053 |
+ { echo "$as_me:$LINENO: WARNING: curl-config was not found" >&5 |
|
11054 |
+echo "$as_me: WARNING: curl-config was not found" >&2;} |
|
11036 | 11055 |
fi |
11037 | 11056 |
fi |
11038 | 11057 |
|
... | ... |
@@ -38,7 +38,7 @@ AC_DEFINE(SCANBUFF, 131072, [scan buffer size]) |
38 | 38 |
AC_DEFINE(FILEBUFF, 8192, [file i/o buffer size]) |
39 | 39 |
|
40 | 40 |
AC_HEADER_STDC |
41 |
-AC_CHECK_HEADERS(stdint.h unistd.h sys/int_types.h dlfcn.h inttypes.h sys/inttypes.h memory.h ndir.h stdlib.h strings.h string.h sys/mman.h sys/param.h sys/stat.h sys/types.h malloc.h poll.h regex.h limits.h) |
|
41 |
+AC_CHECK_HEADERS(stdint.h unistd.h sys/int_types.h dlfcn.h inttypes.h sys/inttypes.h memory.h ndir.h stdlib.h strings.h string.h sys/mman.h sys/param.h sys/stat.h sys/types.h malloc.h poll.h regex.h limits.h sys/filio.h) |
|
42 | 42 |
AC_CHECK_HEADER(syslog.h,AC_DEFINE(USE_SYSLOG,1,[use syslog]),) |
43 | 43 |
|
44 | 44 |
AC_TYPE_OFF_T |
... | ... |
@@ -125,16 +125,35 @@ AC_ARG_WITH(libcurl, |
125 | 125 |
esac], |
126 | 126 |
[ lcurl=auto ]) |
127 | 127 |
|
128 |
+dnl Based on http://curl.signal42.com/libcurl/using/autoconf.html |
|
128 | 129 |
if test "$lcurl" != "no" |
129 | 130 |
then |
130 |
- AC_MSG_CHECKING([for libcurl]) |
|
131 |
+ my_cv_curl_vers=NONE |
|
132 |
+ dnl check is the plain-text version of the required version |
|
133 |
+ check="7.11.0" |
|
134 |
+ dnl check_hex must be UPPERCASE if any hex letters are present |
|
135 |
+ check_hex="070B00" |
|
136 |
+ |
|
137 |
+ AC_MSG_CHECKING([for curl >= $check]) |
|
138 |
+ |
|
131 | 139 |
if eval curl-config --version 2>/dev/null >/dev/null; then |
132 |
- AC_DEFINE(WITH_CURL,1,use libcurl in mbox code) |
|
133 |
- curl_libs=`curl-config --libs` |
|
134 |
- LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $curl_libs" |
|
135 |
- AC_MSG_RESULT(yes) |
|
140 |
+ ver=`curl-config --version | sed -e "s/libcurl //g"` |
|
141 |
+ hex_ver=`curl-config --vernum | tr 'a-f' 'A-F'` |
|
142 |
+ ok=`echo "ibase=16; if($hex_ver>=$check_hex) $hex_ver else 0" | bc` |
|
143 |
+ |
|
144 |
+ if test x$ok != x0; then |
|
145 |
+ curl_libs=`curl-config --libs` |
|
146 |
+ LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $curl_libs" |
|
147 |
+ my_cv_curl_vers="$ver" |
|
148 |
+ AC_MSG_RESULT([$my_cv_curl_vers]) |
|
149 |
+ AC_DEFINE(WITH_CURL,1,use libcurl in mbox code) |
|
150 |
+ else |
|
151 |
+ AC_MSG_RESULT(FAILED) |
|
152 |
+ AC_MSG_WARN([$ver is too old. Need version $check or higher.]) |
|
153 |
+ fi |
|
136 | 154 |
else |
137 |
- AC_MSG_RESULT(no, curl-config not found) |
|
155 |
+ AC_MSG_RESULT(FAILED) |
|
156 |
+ AC_MSG_WARN([curl-config was not found]) |
|
138 | 157 |
fi |
139 | 158 |
fi |
140 | 159 |
|
... | ... |
@@ -64,7 +64,9 @@ int downloadmanager(const struct cfgstruct *copt, const struct optstruct *opt, c |
64 | 64 |
|
65 | 65 |
#ifndef HAVE_GMP |
66 | 66 |
mprintf("SECURITY WARNING: NO SUPPORT FOR DIGITAL SIGNATURES\n"); |
67 |
+ mprintf("See the FAQ at http://www.clamav.net/faq.html for an explanation.\n"); |
|
67 | 68 |
logg("SECURITY WARNING: NO SUPPORT FOR DIGITAL SIGNATURES\n"); |
69 |
+ logg("See the FAQ at http://www.clamav.net/faq.html for an explanation.\n"); |
|
68 | 70 |
#endif |
69 | 71 |
|
70 | 72 |
optl(opt, "no-dns") ? (usedns = 0) : (usedns = 1); |