summaryrefslogtreecommitdiffstats
path: root/m4/want_zlib.m4
blob: 397b8db51b45ec2a79144ac4ead13a19f808b163 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
AC_DEFUN([DOVECOT_WANT_ZLIB], [
  if test "$want_zlib" != "no"; then
    AC_CHECK_HEADER(zlib.h, [
      have_zlib=yes
      have_compress_lib=yes
      AC_DEFINE(HAVE_ZLIB,, [Define if you have zlib library])
      COMPRESS_LIBS="$COMPRESS_LIBS -lz"
    ], [
      if test "$want_zlib" = "yes"; then
        AC_ERROR([Can't build with zlib support: zlib.h not found])
      fi
    ])
  fi
])