diff options
author | kientzle <kientzle@FreeBSD.org> | 2004-07-30 04:14:47 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2004-07-30 04:14:47 +0000 |
commit | 0a0da3ded81ae516e48317e0942d333dd78b0118 (patch) | |
tree | fddac2b611f177145ba5f5098c12c9e1408f153b /lib/libarchive/archive_read_support_compression_all.c | |
parent | 0f5c53085722743d2438cb5277b3f4f47c75231a (diff) | |
download | FreeBSD-src-0a0da3ded81ae516e48317e0942d333dd78b0118.zip FreeBSD-src-0a0da3ded81ae516e48317e0942d333dd78b0118.tar.gz |
Conditionalize the bzip2/gzip compression/decompression
code on the existence of the relevant libraries (actually,
the existence of the include files).
This will allow the library to be easily ported to systems
that don't have these libraries. (Of course, it also means
that clients using the library on such systems will not be
able to take advantage of the automatic compression format
detection.)
Diffstat (limited to 'lib/libarchive/archive_read_support_compression_all.c')
-rw-r--r-- | lib/libarchive/archive_read_support_compression_all.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libarchive/archive_read_support_compression_all.c b/lib/libarchive/archive_read_support_compression_all.c index 9df6c4a..bd3a9b9 100644 --- a/lib/libarchive/archive_read_support_compression_all.c +++ b/lib/libarchive/archive_read_support_compression_all.c @@ -32,8 +32,13 @@ __FBSDID("$FreeBSD$"); int archive_read_support_compression_all(struct archive *a) { +#if HAVE_BZLIB_H archive_read_support_compression_bzip2(a); +#endif + /* The decompress code doesn't use an outside library. */ archive_read_support_compression_compress(a); +#if HAVE_ZLIB_H archive_read_support_compression_gzip(a); +#endif return (ARCHIVE_OK); } |