[llvm-commits] CVS: llvm/autoconf/configure.ac

Reid Spencer reid at x10sys.com
Mon Oct 4 15:06:03 PDT 2004



Changes in directory llvm/autoconf:

configure.ac updated: 1.122 -> 1.123
---
Log message:

Add checks for the ZLIB and BZIP2 header files, not just the libraries.


---
Diffs of the changes:  (+10 -4)

Index: llvm/autoconf/configure.ac
diff -u llvm/autoconf/configure.ac:1.122 llvm/autoconf/configure.ac:1.123
--- llvm/autoconf/configure.ac:1.122	Mon Oct  4 13:02:55 2004
+++ llvm/autoconf/configure.ac	Mon Oct  4 17:05:53 2004
@@ -249,14 +249,20 @@
 
 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]))






More information about the llvm-commits mailing list