mirror of
https://github.com/aria2/aria2.git
synced 2024-11-24 02:23:38 +08:00
d791807add
Added gzip, deflate decoding support in HTTP using libz. If compiled with this feature, aria2 sends "Accept-Encoding: deflate, gzip" header to a HTTP server. If a server returns "Content-Encoding: gzip" or "Content-Encoding: deflate" then, aria2 decodes the response body on the fly and writes decoded data to a local disk. * README * README.html * configure.ac * m4/aria2_arg.m4: Added ARIA2_ARG_WITH and ARIA2_ARG_ENABLE, they are wrapper function for AC_ARG_WITH and AC_ARG_ENABLE respectively. * m4/libz.m4 * src/Decoder.h * src/DownloadCommand.cc * src/DownloadCommand.h * src/Exception.h * src/GZipDecoder.cc * src/GZipDecoder.h * src/HttpHeader.cc * src/HttpHeader.h * src/HttpRequest.cc * src/HttpRequest.h * src/HttpResponse.cc * src/HttpResponse.h * src/HttpResponseCommand.cc * src/Makefile.am * test/GZipDecoderTest.cc * test/HttpRequestTest.cc * test/HttpResponseTest.cc * test/Makefile.am * test/Makefile.in * test/gzip_decode_test.gz
34 lines
792 B
Plaintext
34 lines
792 B
Plaintext
AC_DEFUN([AM_PATH_LIBZ],
|
|
[
|
|
AC_ARG_WITH([libz-prefix],
|
|
[ --with-libz-prefix=PREFIX Prefix where libz installed (optional)],
|
|
[libz_prefix=$withval],
|
|
[libz_prefix=""])
|
|
|
|
if test "x$libz_prefix" = "x"; then
|
|
libz_prefix="/usr"
|
|
fi
|
|
|
|
libz_prefix_lib=$libz_prefix/lib
|
|
libz_prefix_include=$libz_prefix/include
|
|
|
|
LIBS_save=$LIBS
|
|
CPPFLAGS_save=$CPPFLAGS
|
|
|
|
LIBS="-L$libz_prefix_lib $LIBS"
|
|
CPPFLAGS="-I$libz_prefix_include $CPPFLAGS"
|
|
|
|
AC_CHECK_LIB([z], [zlibVersion], [have_libz=yes])
|
|
if test "x$have_libz" = "xyes"; then
|
|
AC_DEFINE([HAVE_LIBZ], [1], [Define to 1 if you have libz.])
|
|
LIBZ_LIBS="-L$libz_prefix_lib -lz"
|
|
LIBZ_CPPFLAGS="-I$libz_prefix_include"
|
|
AC_SUBST(LIBZ_LIBS)
|
|
AC_SUBST(LIBZ_CPPFLAGS)
|
|
fi
|
|
|
|
LIBS=$LIBS_save
|
|
CPPFLAGS=$CPPFLAGS_save
|
|
|
|
])
|