diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 181c07bf5..ad08c2388 100644 --- a/configure.ac +++ b/configure.ac @@ -1321,7 +1321,16 @@ fi AM_CONDITIONAL(ENABLE_LOCAL_ZLIB, test "$use_local_zlib" = yes) -if test "$use_bzip2" = yes ; then + +# Under W32 we force the use ofthe included bzip2 code. +if test x"$have_w32_system" = xyes ; then + have_bz2=yes + AC_DEFINE(HAVE_BZIP2,1, + [Defined if the bz2 compression library is available]) + AC_CONFIG_LINKS(bzlib.h:bzlib/bzlib.h) + ZLIBS="$ZLIBS ../bzlib/libbz2.a" +else + if test "$use_bzip2" = yes ; then _cppflags="${CPPFLAGS}" _ldflags="${LDFLAGS}" AC_ARG_WITH(bzip2, @@ -1343,12 +1352,12 @@ if test "$use_bzip2" = yes ; then [ have_bz2=yes ZLIBS="$ZLIBS -lbz2" - AC_DEFINE(HAVE_BZIP2,1, - [Defined if the bz2 compression library is available]) + AC_DEFINE(HAVE_BZIP2,1) ], CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}), CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags},[#include <stdio.h>]) fi + fi fi AM_CONDITIONAL(ENABLE_BZIP2_SUPPORT,test x"$have_bz2" = "xyes") @@ -1470,6 +1479,7 @@ doc/Makefile tools/Makefile tools/gpg-zip zlib/Makefile +bzlib/Makefile checks/Makefile ]) AC_OUTPUT |