aboutsummaryrefslogtreecommitdiff
path: root/autoconf
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-10-02 08:50:58 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-10-02 08:50:58 +0000
commitc28d7ad257bbba300d5cd5fb6443dd0c7c0322ad (patch)
treede8561743084884c365c32df52f80ecc34f7ef30 /autoconf
parent7cf34908920dc714eba7525d38747de2cdc81402 (diff)
Add checks for bzip2 and libz for use with the Compression concept for
lib/System and the compressing llvm archiver. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16634 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 9d06ce10d4..f0ffcb5372 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -247,6 +247,22 @@ dnl Checks for libraries:
dnl libelf is for sparc only; we can ignore it if we don't have it
AC_CHECK_LIB(elf, elf_begin)
+dnl Check for bzip2 and zlib compression libraries needed for archive reading/writing
+AC_CHECK_LIB(bz2,BZ2_bzCompressInit,[bzip2_found=1],[bzip2_found=0])
+AC_CHECK_LIB(z,gzopen,[zlib_found=1],[zlib_found=0])
+if test $zlib_found -eq 1 ; then
+ AC_DEFINE([HAVE_ZLIB],[1],[Define if zlib library is available on this platform.])
+fi
+if test $bzip2_found -eq 1 ; then
+ AC_DEFINE([HAVE_BZIP2],[1],[Define if bzip2 library is available on this platform.])
+else
+ if test $zlib_found -ne 1 ; then
+ AC_MSG_WARN([**** Neither zlib nor bzip2 compression libraries were found -
+ archives will not support compression! Install bzip2 or zlib
+ and then reconfigure to ensure compatibility])
+ fi
+fi
+
dnl dlopen() is required for plugin support.
AC_SEARCH_LIBS(dlopen,dl,AC_DEFINE([HAVE_DLOPEN],[1],[Define if dlopen() is available on this platform.]),AC_MSG_WARN([dlopen() not found - disabling plugin support]))