~ubuntu-branches/ubuntu/lucid/clamav/lucid-updates

« back to all changes in this revision

Viewing changes to m4/reorganization/libs/libz.m4

  • Committer: Package Import Robot
  • Author(s): Chris, Marc Deslauriers, Chris Pollock
  • Date: 2015-02-08 07:54:07 UTC
  • mfrom: (81.1.10 lucid-security)
  • Revision ID: package-import@ubuntu.com-20150208075407-sjpyx5pb5emtexcl
Tags: 0.98.6+dfsg-0ubuntu0.10.04.1
[ Marc Deslauriers ]
* Updated to 0.98.6 to fix security issues, including CVE-2014-9328.
  (LP: #1420819)
* Removed upstreamed patches:
  - d/p/0002-Add-an-additional-n-after-the-number-in-the-pidfile.patch
  - d/p/0017-Bump-.so-version-number.patch

[ Chris Pollock ]
* Drop dh_autoreconf from build-depends
* Remove use of dh_autoreconf from debian/rules
* Adjust list of no LLVM architectures in debian/rules to include powerpc
  to avoid FTBFS on lucid

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
dnl Check for zlib
 
3
AC_MSG_CHECKING([for zlib installation])
 
4
AC_ARG_WITH([zlib],
 
5
[  --with-zlib=DIR        path to directory containing zlib library (default=
 
6
                          /usr/local or /usr if not found in /usr/local)],
 
7
[
 
8
if test "$withval"; then
 
9
  ZLIB_HOME="$withval"
 
10
  AC_MSG_RESULT([using $ZLIB_HOME])
 
11
fi
 
12
], [
 
13
ZLIB_HOME=/usr/local
 
14
if test ! -f "$ZLIB_HOME/include/zlib.h"
 
15
then
 
16
  ZLIB_HOME=/usr
 
17
fi
 
18
AC_MSG_RESULT([$ZLIB_HOME])
 
19
])
 
20
 
 
21
CLAMDSCAN_LIBS="$FRESHCLAM_LIBS"
 
22
 
 
23
AC_ARG_ENABLE([zlib-vcheck],
 
24
[  --disable-zlib-vcheck          do not check for buggy zlib version ],
 
25
zlib_check=$enableval, zlib_check="yes")
 
26
 
 
27
if test ! -f "$ZLIB_HOME/include/zlib.h"
 
28
then
 
29
    AC_MSG_ERROR([Please install zlib and zlib-devel packages])
 
30
else
 
31
 
 
32
    vuln=`grep "ZLIB_VERSION \"1.2.0" $ZLIB_HOME/include/zlib.h`
 
33
    if test -z "$vuln"; then
 
34
        vuln=`grep "ZLIB_VERSION \"1.2.1" $ZLIB_HOME/include/zlib.h`
 
35
    fi
 
36
 
 
37
    if test -n "$vuln"; then
 
38
        if test "$zlib_check" = "yes"; then
 
39
            AC_MSG_ERROR(The installed zlib version may contain a security bug. Please upgrade to 1.2.2 or later: http://www.zlib.net. You can omit this check with --disable-zlib-vcheck but DO NOT REPORT any stability issues then!)
 
40
        else
 
41
            AC_MSG_WARN([****** This ClamAV installation may be linked against])
 
42
            AC_MSG_WARN([****** a broken zlib version. Please DO NOT report any])
 
43
            AC_MSG_WARN([****** stability problems to the ClamAV developers!])
 
44
        fi
 
45
    fi
 
46
 
 
47
    save_LIBS="$LIBS"
 
48
    if test "$ZLIB_HOME" != "/usr"; then
 
49
        CPPFLAGS="$CPPFLAGS -I$ZLIB_HOME/include"
 
50
        save_LDFLAGS="$LDFLAGS"
 
51
    LDFLAGS="$LDFLAGS -L$ZLIB_HOME/lib"
 
52
    AC_CHECK_LIB([z], [inflateEnd], [LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -L$ZLIB_HOME/lib -lz"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -L$ZLIB_HOME/lib -lz"], AC_MSG_ERROR([Please install zlib and zlib-devel packages]))
 
53
        AC_CHECK_LIB([z], [gzopen], [], AC_MSG_ERROR([Your zlib is missing gzopen()]))
 
54
        LDFLAGS="$save_LDFLAGS"
 
55
    else
 
56
        AC_CHECK_LIB([z], [inflateEnd], [LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lz";FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lz"], AC_MSG_ERROR([Please install zlib and zlib-devel packages]))
 
57
        AC_CHECK_LIB([z], [gzopen],[], AC_MSG_ERROR([Your zlib is missing gzopen()]))
 
58
    fi
 
59
    LIBS="$save_LIBS"
 
60
fi