summaryrefslogtreecommitdiff
path: root/autoconf
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-10-04 22:05:53 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-10-04 22:05:53 +0000
commit0d98aede69482382794a851fb6fb9ff4a495294e (patch)
tree2f66e7962a54e6c060376b58c0d51f652cb59378 /autoconf
parentc441f1e1c74853721b2f513c3597c391bd11ccc2 (diff)
downloadllvm-0d98aede69482382794a851fb6fb9ff4a495294e.tar.gz
llvm-0d98aede69482382794a851fb6fb9ff4a495294e.tar.bz2
llvm-0d98aede69482382794a851fb6fb9ff4a495294e.tar.xz
Add checks for the ZLIB and BZIP2 header files, not just the libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16669 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/configure.ac14
1 files changed, 10 insertions, 4 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index c7a0bfcf6a..e02ed9d314 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -249,14 +249,20 @@ 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_HEADERS([bzlib.h],[bzlib_h_found=1],[bzlib_h_found=0],[])
AC_CHECK_LIB(z,gzopen,[zlib_found=1],[zlib_found=0])
-AC_SUBST([HAVE_ZLIB],$zlib_found)
-AC_SUBST([HAVE_BZIP2],$bzip2_found)
-if test $zlib_found -eq 1 ; then
+AC_CHECK_HEADERS([zlib.h],[zlib_h_found=1],[zlib_h_found=0],[])
+if test $zlib_found -eq 1 -a $zlib_h_found -eq 1; then
AC_DEFINE([HAVE_ZLIB],[1],[Define if zlib library is available on this platform.])
+ AC_SUBST([HAVE_ZLIB],[1])
+else
+ AC_SUBST([HAVE_ZLIB],[0])
fi
-if test $bzip2_found -eq 1 ; then
+if test $bzip2_found -eq 1 -a $bzlib_h_found -eq 1 ; then
AC_DEFINE([HAVE_BZIP2],[1],[Define if bzip2 library is available on this platform.])
+ AC_SUBST([HAVE_BZIP2],[1])
+else
+ AC_SUBST([HAVE_BZIP2],[0])
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]))