summaryrefslogtreecommitdiff
path: root/source/a/infozip/unzip.use.system.libbz2.diff
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/infozip/unzip.use.system.libbz2.diff')
-rw-r--r--source/a/infozip/unzip.use.system.libbz2.diff28
1 files changed, 28 insertions, 0 deletions
diff --git a/source/a/infozip/unzip.use.system.libbz2.diff b/source/a/infozip/unzip.use.system.libbz2.diff
new file mode 100644
index 00000000..ab10997d
--- /dev/null
+++ b/source/a/infozip/unzip.use.system.libbz2.diff
@@ -0,0 +1,28 @@
+--- ./unix/configure.orig 2009-04-16 14:25:12.000000000 -0500
++++ ./unix/configure 2013-09-12 13:32:24.274604436 -0500
+@@ -640,7 +640,24 @@
+ D_USE_BZ2="-DUSE_BZIP2"
+ L_BZ2="${BZLF} -lbz2"
+ else
+- echo "-- bzip2 sources not found - no bzip2 support"
++ echo " Check if OS already has bzip2 library installed"
++ cat > conftest.c << _EOF_
++#include "bzlib.h"
++int main()
++{
++ bz_stream strm;
++ BZ2_bzCompressEnd(&strm);
++ return 0;
++}
++_EOF_
++ $CC $CFLAGS -o conftest conftest.c -lbz2 > /dev/null 2>/dev/null
++ if test $? -eq 0; then
++ echo "-- OS supports bzip2 - linking in bzip2"
++ D_USE_BZ2="-DUSE_BZIP2"
++ L_BZ2="${BZLF} -lbz2"
++ else
++ echo "-- Either bzlib.h or libbz2.a not found - no bzip2"
++ fi
+ fi
+ fi
+