diff options
author | David Shaw <[email protected]> | 2003-10-31 04:29:38 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2003-10-31 04:29:38 +0000 |
commit | ba38a9c7b73c589fb6dd52e4405413732b901bb1 (patch) | |
tree | 760dcd429dd74f54bef6e08939d6c5ac11cbf0cf | |
parent | * cipher.h: Add COMPRESS_ALGO_BZIP2. (diff) | |
download | gnupg-ba38a9c7b73c589fb6dd52e4405413732b901bb1.tar.gz gnupg-ba38a9c7b73c589fb6dd52e4405413732b901bb1.zip |
* configure.ac: Locate libbz2 for bzip2 compression support.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | configure.ac | 26 |
2 files changed, 29 insertions, 1 deletions
@@ -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 |