Build system: don't check for HAVE_ZLIB_H

zlib is a required component (configure aborts if it isn't found)
anyway.
This commit is contained in:
Moritz Bunkus 2011-10-23 20:16:55 +02:00
parent dd099f0c99
commit 4f5d17c661
3 changed files with 3 additions and 23 deletions

View File

@ -102,7 +102,6 @@ lzo_compressor_c::compress(memory_cptr &buffer) {
// ---------------------------------------------------------------------
#if defined(HAVE_ZLIB_H)
zlib_compressor_c::zlib_compressor_c()
: compressor_c(COMPRESSION_ZLIB)
{
@ -185,8 +184,6 @@ zlib_compressor_c::compress(memory_cptr &buffer) {
buffer = memory_cptr(new memory_c((unsigned char *)saferealloc(dst, dstsize), dstsize, true));
}
#endif // HAVE_ZLIB_H
// ---------------------------------------------------------------------
#if defined(HAVE_BZLIB_H)
@ -437,10 +434,8 @@ compressor_c::create(const char *method) {
return compressor_ptr(new lzo_compressor_c());
#endif // HAVE_LZO1X_H
#if defined(HAVE_ZLIB_H)
if (!strcasecmp(method, compression_methods[COMPRESSION_ZLIB]))
return compressor_ptr(new zlib_compressor_c());
#endif // HAVE_ZLIB_H
#if defined(HAVE_BZLIB_H)
if (!strcasecmp(method, compression_methods[COMPRESSION_BZ2]))
@ -584,15 +579,10 @@ content_decoder_c::initialize(KaxTrackEntry &ktentry) {
break;
}
if (0 == enc.comp_algo) {
#if !defined(HAVE_ZLIB_H)
mxwarn(boost::format(Y("Track %1% was compressed with zlib but mkvmerge has not been compiled with support for zlib compression.\n")) % tid);
ok = false;
break;
#else
if (0 == enc.comp_algo)
enc.compressor = counted_ptr<compressor_c>(new zlib_compressor_c());
#endif
} else if (1 == enc.comp_algo) {
else if (1 == enc.comp_algo) {
#if !defined(HAVE_BZLIB_H)
mxwarn(boost::format(Y("Track %1% was compressed with bzlib but mkvmerge has not been compiled with support for bzlib compression.\n")) % tid);
ok = false;

View File

@ -102,7 +102,6 @@ public:
};
#endif // HAVE_LZO
#if defined(HAVE_ZLIB_H)
#include <zlib.h>
class MTX_DLL_API zlib_compressor_c: public compressor_c {
@ -113,7 +112,6 @@ public:
virtual void decompress(memory_cptr &buffer);
virtual void compress(memory_cptr &buffer);
};
#endif // HAVE_ZLIB_H
#if defined(HAVE_BZLIB_H)
#include <bzlib.h>

View File

@ -20,9 +20,7 @@
#include <algorithm>
#include <boost/math/common_factor.hpp>
#include <cstring>
#if defined(HAVE_ZLIB_H)
#include <zlib.h>
#endif
#include <avilib.h>
@ -492,8 +490,6 @@ qtmp4_reader_c::handle_cmov_atom(qt_atom_t parent,
void
qtmp4_reader_c::handle_cmvd_atom(qt_atom_t atom,
int level) {
#if defined(HAVE_ZLIB_H)
uint32_t moov_size = io->read_uint32_be();
mxverb(2, boost::format("Quicktime/MP4 reader:%1%Uncompressed size: %2%\n") % space((level + 1) * 2 + 1) % moov_size);
@ -548,10 +544,6 @@ qtmp4_reader_c::handle_cmvd_atom(qt_atom_t atom,
}
delete io;
io = old_io;
#else // HAVE_ZLIB_H
mxerror(Y("mkvmerge was not compiled with zlib. Compressed headers in QuickTime/MP4 files are therefore not supported.\n"));
#endif // HAVE_ZLIB_H
}
void