Browse code

update

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1166 77e5149b-7576-45b1-b177-96237e5ba77b

Tomasz Kojm authored on 2004/12/08 07:46:18
Showing 5 changed files
... ...
@@ -1,3 +1,8 @@
1
+Tue Dec  7 23:40:30 CET 2004 (tk)
2
+---------------------------------
3
+  * configure: added --disable-zlib-vcheck (allows building on potentially
4
+	       buggy zlib versions (1.2.0 & 1.2.1))
5
+
1 6
 Tue Dec  7 19:25:06 GMT 2004 (njh)
2 7
 ----------------------------------
3 8
   * clamav-milter:	Ensure that the daily quarantine directory is created
... ...
@@ -283,7 +283,4 @@ int readsock(int sockfd, char *buf, size_t size)
283 283
 	return -1;
284 284
     return n;
285 285
 }
286
-
287
-#else
288
-#define	readsock	read
289 286
 #endif
... ...
@@ -26,11 +26,15 @@
26 26
 #include <stdlib.h>
27 27
 #include "cfgparser.h"
28 28
 
29
-
30 29
 int poll_fd(int fd, int timeout_sec);
31 30
 int is_fd_connected(int fd);
32 31
 void virusaction(const char *virname, const struct cfgstruct *copt);
33 32
 int writen(int fd, void *buff, unsigned int count);
33
+
34
+#if defined(HAVE_RECVMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR)) && !defined(C_CYGWIN)
34 35
 int readsock(int sockfd, char *buf, size_t size);
36
+#else
37
+#define	readsock	read
38
+#endif
35 39
 
36 40
 #endif
... ...
@@ -1015,6 +1015,7 @@ Optional Features:
1015 1015
   --enable-static=PKGS  build static libraries default=yes
1016 1016
   --enable-fast-install=PKGS  optimize for fast installation default=yes
1017 1017
   --disable-libtool-lock  avoid locking (might break parallel builds)
1018
+  --disable-zlib-vcheck	  do not check for buggy zlib version
1018 1019
   --disable-bzip2	  disable bzip2 support
1019 1020
   --disable-dns           disable support for database verification through
1020 1021
                           DNS
... ...
@@ -5020,7 +5021,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
5020 5020
 case $host in
5021 5021
 *-*-irix6*)
5022 5022
   # Find out which ABI we are using.
5023
-  echo '#line 5023 "configure"' > conftest.$ac_ext
5023
+  echo '#line 5024 "configure"' > conftest.$ac_ext
5024 5024
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5025 5025
   (eval $ac_compile) 2>&5
5026 5026
   ac_status=$?
... ...
@@ -5593,7 +5594,7 @@ chmod -w .
5593 5593
 save_CFLAGS="$CFLAGS"
5594 5594
 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5595 5595
 compiler_c_o=no
5596
-if { (eval echo configure:5596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5596
+if { (eval echo configure:5597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5597 5597
   # The compiler can only warn and ignore the option if not recognized
5598 5598
   # So say no if there are warnings
5599 5599
   if test -s out/conftest.err; then
... ...
@@ -7520,7 +7521,7 @@ else
7520 7520
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7521 7521
   lt_status=$lt_dlunknown
7522 7522
   cat > conftest.$ac_ext <<EOF
7523
-#line 7523 "configure"
7523
+#line 7524 "configure"
7524 7524
 #include "confdefs.h"
7525 7525
 
7526 7526
 #if HAVE_DLFCN_H
... ...
@@ -7618,7 +7619,7 @@ else
7618 7618
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7619 7619
   lt_status=$lt_dlunknown
7620 7620
   cat > conftest.$ac_ext <<EOF
7621
-#line 7621 "configure"
7621
+#line 7622 "configure"
7622 7622
 #include "confdefs.h"
7623 7623
 
7624 7624
 #if HAVE_DLFCN_H
... ...
@@ -10258,21 +10259,38 @@ echo "${ECHO_T}$ZLIB_HOME" >&6
10258 10258
 
10259 10259
 fi;
10260 10260
 
10261
+zlib_check="yes"
10262
+# Check whether --enable-zlib-vcheck or --disable-zlib-vcheck was given.
10263
+if test "${enable_zlib_vcheck+set}" = set; then
10264
+  enableval="$enable_zlib_vcheck"
10265
+  zlib_check="no"
10266
+fi;
10267
+
10261 10268
 if test ! -f "$ZLIB_HOME/include/zlib.h"
10262 10269
 then
10263 10270
     { { echo "$as_me:$LINENO: error: Please install zlib and zlib-devel packages" >&5
10264 10271
 echo "$as_me: error: Please install zlib and zlib-devel packages" >&2;}
10265 10272
    { (exit 1); exit 1; }; }
10266 10273
 else
10274
+
10267 10275
     vuln=`grep "ZLIB_VERSION \"1.2.0" $ZLIB_HOME/include/zlib.h`
10268 10276
     if test -z "$vuln"; then
10269 10277
 	vuln=`grep "ZLIB_VERSION \"1.2.1" $ZLIB_HOME/include/zlib.h`
10270 10278
     fi
10271 10279
 
10272 10280
     if test -n "$vuln"; then
10273
-	{ { echo "$as_me:$LINENO: error: Installed zlib version contains a security bug. Please install version 1.2.2 or later." >&5
10274
-echo "$as_me: error: Installed zlib version contains a security bug. Please install version 1.2.2 or later." >&2;}
10281
+	if test "$zlib_check" = "yes"; then
10282
+	    { { echo "$as_me:$LINENO: error: The installed zlib version may contain a security bug. Please upgrade to 1.2.2 or later: http://www.zlib.net" >&5
10283
+echo "$as_me: error: The installed zlib version may contain a security bug. Please upgrade to 1.2.2 or later: http://www.zlib.net" >&2;}
10275 10284
    { (exit 1); exit 1; }; }
10285
+	else
10286
+	    { echo "$as_me:$LINENO: WARNING: ****** This ClamAV installation may be linked against" >&5
10287
+echo "$as_me: WARNING: ****** This ClamAV installation may be linked against" >&2;}
10288
+	    { echo "$as_me:$LINENO: WARNING: ****** a broken zlib version. Please DO NOT report any" >&5
10289
+echo "$as_me: WARNING: ****** a broken zlib version. Please DO NOT report any" >&2;}
10290
+	    { echo "$as_me:$LINENO: WARNING: ****** stability problems to the ClamAV developers!" >&5
10291
+echo "$as_me: WARNING: ****** stability problems to the ClamAV developers!" >&2;}
10292
+	fi
10276 10293
     fi
10277 10294
 
10278 10295
     if test "$ZLIB_HOME" != "/usr"; then
... ...
@@ -93,17 +93,29 @@ fi
93 93
 AC_MSG_RESULT($ZLIB_HOME)
94 94
 ])
95 95
 
96
+zlib_check="yes"
97
+AC_ARG_ENABLE(zlib-vcheck,
98
+[  --disable-zlib-vcheck	  do not check for buggy zlib version ],
99
+zlib_check="no",)
100
+
96 101
 if test ! -f "$ZLIB_HOME/include/zlib.h"
97 102
 then
98 103
     AC_MSG_ERROR(Please install zlib and zlib-devel packages)
99 104
 else
105
+
100 106
     vuln=`grep "ZLIB_VERSION \"1.2.0" $ZLIB_HOME/include/zlib.h`
101 107
     if test -z "$vuln"; then
102 108
 	vuln=`grep "ZLIB_VERSION \"1.2.1" $ZLIB_HOME/include/zlib.h`
103 109
     fi
104 110
 
105 111
     if test -n "$vuln"; then
106
-	AC_MSG_ERROR(Installed zlib version contains a security bug. Please install version 1.2.2 or later.)
112
+	if test "$zlib_check" = "yes"; then
113
+	    AC_MSG_ERROR(The installed zlib version may contain a security bug. Please upgrade to 1.2.2 or later: http://www.zlib.net)
114
+	else
115
+	    AC_MSG_WARN([****** This ClamAV installation may be linked against])
116
+	    AC_MSG_WARN([****** a broken zlib version. Please DO NOT report any])
117
+	    AC_MSG_WARN([****** stability problems to the ClamAV developers!])
118
+	fi
107 119
     fi
108 120
 
109 121
     if test "$ZLIB_HOME" != "/usr"; then