aria2/m4/libz.m4
Tatsuhiro Tsujikawa d791807add 2008-06-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
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
2008-06-29 14:29:36 +00:00

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
])