From 769756525d44c41e84fd3eca1d77b217fdd39fa4 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Fri, 30 Jul 2004 04:14:47 +0000 Subject: 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.) --- lib/libarchive/archive_read_support_compression_bzip2.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/libarchive/archive_read_support_compression_bzip2.c') diff --git a/lib/libarchive/archive_read_support_compression_bzip2.c b/lib/libarchive/archive_read_support_compression_bzip2.c index 99acc62bc1a10..e65d0acf99ba9 100644 --- a/lib/libarchive/archive_read_support_compression_bzip2.c +++ b/lib/libarchive/archive_read_support_compression_bzip2.c @@ -25,6 +25,10 @@ */ #include "archive_platform.h" + +/* Don't compile this if we don't have bzlib. */ +#if HAVE_BZLIB_H + __FBSDID("$FreeBSD$"); #include @@ -361,3 +365,5 @@ fatal: a->compression_name); return (ARCHIVE_FATAL); } + +#endif /* HAVE_BZLIB_H */ -- cgit v1.3