0006-unzip-6.0-bzip2-configure.patch (868B)
1 diff -up unzip60/unix/configure.bzip2-configure unzip60/unix/configure 2 --- unzip60/unix/configure.bzip2-configure 2009-04-16 21:25:12.000000000 +0200 3 +++ unzip60/unix/configure 2009-11-18 11:22:14.598389194 +0100 4 @@ -640,7 +640,24 @@ else 5 D_USE_BZ2="-DUSE_BZIP2" 6 L_BZ2="${BZLF} -lbz2" 7 else 8 - echo "-- bzip2 sources not found - no bzip2 support" 9 + echo " Check if OS already has bzip2 library installed" 10 + cat > conftest.c << _EOF_ 11 +#include "bzlib.h" 12 +int main() 13 +{ 14 + bz_stream strm; 15 + BZ2_bzCompressEnd(&strm); 16 + return 0; 17 +} 18 +_EOF_ 19 + $CC $CFLAGS -o conftest conftest.c -lbz2 > /dev/null 2>/dev/null 20 + if test $? -eq 0; then 21 + echo "-- OS supports bzip2 - linking in bzip2" 22 + D_USE_BZ2="-DUSE_BZIP2" 23 + L_BZ2="${BZLF} -lbz2" 24 + else 25 + echo "-- Either bzlib.h or libbz2.a not found - no bzip2" 26 + fi 27 fi 28 fi 29 30