aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac26
2 files changed, 29 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e9ad32131..88d52f8c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-10-30 David Shaw <[email protected]>
+
+ * configure.ac: Locate libbz2 for bzip2 compression support.
+
2003-10-27 David Shaw <[email protected]>
* configure.ac (DLLIBS): Work properly on platforms where dlopen
diff --git a/configure.ac b/configure.ac
index 62f0eba6d..8d4dbc18a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -835,8 +835,32 @@ if test "$use_local_zlib" = yes ; then
else
AM_CONDITIONAL(ENABLE_LOCAL_ZLIB, false)
fi
-AC_SUBST(ZLIBS)
+_cppflags="${CPPFLAGS}"
+_ldflags="${LDFLAGS}"
+AC_ARG_WITH(bzip2,
+ AC_HELP_STRING([--with-bzip2=DIR],[look for bzip2 in DIR]),
+ [
+ if test -d "$withval" ; then
+ CPPFLAGS="${CPPFLAGS} -I$withval/include"
+ LDFLAGS="${LDFLAGS} -L$withval/lib"
+ fi
+ ],withval="")
+
+if test "$withval" != no ; then
+ AC_CHECK_HEADER(bzlib.h,
+ AC_CHECK_LIB(bz2,BZ2_bzCompressInit,
+ [
+ ZLIBS="$ZLIBS -lbz2"
+ AC_DEFINE(HAVE_BZIP2,1,
+ [Defined if the bz2 compression library is available])
+ ],
+ CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
+ CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
+fi
+
+AM_CONDITIONAL(ENABLE_BZIP2_SUPPORT,test x"$have_bz2" = "xyes")
+AC_SUBST(ZLIBS)
# Allow users to append something to the version string without
# flagging it as development version. The user version parts is