TEST_WITH(sodium, $withval),
want_sodium=auto)
-AC_ARG_WITH(zlib,
-AS_HELP_STRING([--with-zlib], [Build with zlib compression support (auto)]),
- TEST_WITH(zlib, $withval),
- want_zlib=auto)
-
AC_ARG_WITH(bzlib,
AS_HELP_STRING([--with-bzlib], [Build with bzlib compression support (auto)]),
TEST_WITH(bzlib, $withval),
COMPRESS_LIBS=
-DOVECOT_WANT_ZLIB
+DOVECOT_ZLIB
DOVECOT_WANT_BZLIB
DOVECOT_WANT_LZ4
DOVECOT_WANT_ZSTD
AC_SUBST(COMPRESS_LIBS)
-AM_CONDITIONAL(BUILD_ZLIB_PLUGIN, test "$have_compress_lib" = "yes")
-
DOVECOT_RPCGEN
DOVECOT_QUOTA
+++ /dev/null
-AC_DEFUN([DOVECOT_WANT_ZLIB], [
- have_zlib=no
-
- AS_IF([test "$want_zlib" != "no"], [
- PKG_CHECK_MODULES([ZLIB], [zlib], [have_zlib=yes], [
- have_zlib=no
-
- AS_IF([test "$want_zlib" = "yes"], [
- AC_MSG_ERROR([cannot build with zlib support: zlib library not found])
- ])
- ])
- ])
-
- AS_IF([test "$have_zlib" != "no"], [
- have_compress_lib=yes
- COMPRESS_LIBS="$COMPRESS_LIBS $ZLIB_LIBS"
- AC_DEFINE(HAVE_ZLIB,, [Define if you have zlib library])
- ])
-])
--- /dev/null
+AC_DEFUN([DOVECOT_ZLIB], [
+ PKG_CHECK_MODULES([ZLIB], [zlib], [
+ have_compress_lib=yes
+ COMPRESS_LIBS="$COMPRESS_LIBS $ZLIB_LIBS"
+ ], [
+ AC_MSG_ERROR([cannot build with zlib support: zlib library not found])
+ ])
+])
return match;
}
-#ifdef HAVE_ZLIB
static void
cmd_dump_imapzlib(const char *path, const char *const *args ATTR_UNUSED)
{
if (close(fd) < 0)
i_fatal("close() failed: %m");
}
-#else
-static void
-cmd_dump_imapzlib(const char *path ATTR_UNUSED,
- const char *const *args ATTR_UNUSED)
-{
- i_fatal("Dovecot compiled without zlib support");
-}
-
-static void cmd_zlibconnect(struct doveadm_cmd_context *cctx ATTR_UNUSED)
-{
- i_fatal("Dovecot compiled without zlib support");
-}
-#endif
struct doveadm_cmd_dump doveadm_cmd_dump_zlib = {
"imapzlib",
#include "iostream-lz4.h"
#include "compression.h"
-#ifndef HAVE_ZLIB
-# define i_stream_create_gz NULL
-# define o_stream_create_gz NULL
-# define i_stream_create_deflate NULL
-# define o_stream_create_deflate NULL
-# define compression_get_min_level_gz NULL
-# define compression_get_default_level_gz NULL
-# define compression_get_max_level_gz NULL
-#endif
#ifndef HAVE_BZLIB
# define i_stream_create_bz2 NULL
# define o_stream_create_bz2 NULL
/* Copyright (c) 2010-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
-
-#ifdef HAVE_ZLIB
-
#include "crc32.h"
#include "istream-private.h"
#include "istream-zlib.h"
{
return i_stream_create_zlib(input, FALSE);
}
-#endif
/* Copyright (c) 2010-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
-
-#ifdef HAVE_ZLIB
-
#include "crc32.h"
#include "ostream-private.h"
#include "ostream-zlib.h"
{
return o_stream_create_zlib(output, level, FALSE);
}
-#endif
-if BUILD_ZLIB_PLUGIN
-ZLIB = zlib imap-zlib
-endif
-
if BUILD_SOLR
FTS_SOLR = fts-solr
endif
trash \
virtual \
welcome \
- $(ZLIB) \
+ zlib \
+ imap-zlib \
$(FTS_SOLR) \
$(FTS_FLATCURVE) \
$(DICT_LDAP) \