summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2019-11-18 19:11:52 -0800
committerKevin McCarthy <kevin@8t8.us>2019-11-30 14:34:28 -0800
commitf2f6dd46596f30fdbdd5f8d85f253242a095cb9c (patch)
treef7e2092b65f2cb669242cf68a1ffa9e7d0f10a55 /configure.ac
parent136ae0add512f21bc418f9e31a2f1b970ad1a490 (diff)
Fixes and cleanup for imap deflate patch.
Rework mutt_zstrm_read(): - Pass along the error if conn_read() returns < 0. - Separate out conn_eof and stream_eof flags so they can be dealt with differently. - Don't use Z_FINISH on conn_eof, because the passed in buf might not be big enough to hold the decompressed output. Instead continue looping until either Z_STREAM_END or Z_BUF_ERROR. - Remove recursive calls to retry, instead goto 'retry' target. - Remove op statements in malloc/free. - Bail on other rcs. Mutt doesn't check errno on a read error, so lump all other error codes into a -1 return value. Use default so we handle other weird stuff such as Z_NEED_DICT or Z_STREAM_ERROR too. Convert $imap_deflate to boolean, default unset. Configure.ac fixes: - Fix indentation - Remove unneeded AM_CONDITIONAL. - Don't restore LDFLAGS and CPPFLAGS. Save and restore LIBS instead. imap_conn_find() fixes: - Don't queue CAPABILITY command. (This mistake has been in there since UTF-8 and QRESYNC were added.). - Check imap_exec() returns 0 before wrapping. Even with FAIL_OK set, the imap_exec() can still return -1 on some errors.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 4 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 4e9cf2b2..7fe55402 100644
--- a/configure.ac
+++ b/configure.ac
@@ -764,13 +764,12 @@ then
if test "$need_imap" = "yes"
then
have_zlib=
- saved_LDFLAGS="$LDFLAGS"
- saved_CPPFLAGS="$CPPFLAGS"
- if test "$zlib_prefix" != "yes"
+ if test "$zlib_prefix" != "yes" -a "$zlib_prefix" != "auto"
then
LDFLAGS="$LDFLAGS -L$zlib_prefix/lib"
- CPPFLAGS="$CPPFLAGS -I$zlib_prefix/include"
+ CPPFLAGS="$CPPFLAGS -I$zlib_prefix/include"
fi
+ saved_LIBS="$LIBS"
AC_CHECK_HEADERS([zlib.h], [AC_CHECK_LIB([z], [deflate],
[have_zlib=yes])])
if test "x$have_zlib" = "x"
@@ -779,20 +778,16 @@ then
then
AC_MSG_ERROR([ZLIB requested, but library or headers not found])
fi
- zlib_prefix=no
else
MUTTLIBS="$MUTTLIBS -lz"
AC_DEFINE(USE_ZLIB, 1, [Define if you have libz available])
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_zstrm.o"
- zlib_prefix=yes
fi
- LDFLAGS="$saved_LDFLAGS"
- CPPFLAGS="$saved_CPPFLAGS"
+ LIBS="$saved_LIBS"
else
AC_MSG_WARN([ZLIB was requested but IMAP is not enabled])
fi
fi
-AM_CONDITIONAL(USE_ZLIB, test x$zlib_prefix = xyes)
dnl -- end imap dependencies --