Try to use zlib by default, but just show a warning if it's
authorFabian Keil <fk@fabiankeil.de>
Sun, 25 May 2008 15:50:14 +0000 (15:50 +0000)
committerFabian Keil <fk@fabiankeil.de>
Sun, 25 May 2008 15:50:14 +0000 (15:50 +0000)
unavailable. Remove --enable-zlib, add  --disable-zlib.

configure.in

index bc5ca2e..1e1ab75 100644 (file)
@@ -1,8 +1,8 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl 
-dnl $Id: configure.in,v 1.113 2008/04/06 14:54:26 fabiankeil Exp $
+dnl $Id: configure.in,v 1.114 2008/04/06 15:18:33 fabiankeil Exp $
 dnl 
-dnl Written by and Copyright (C) 2001 - 2007 the SourceForge
+dnl Written by and Copyright (C) 2001-2008 the SourceForge
 dnl Privoxy team. http://www.privoxy.org/
 dnl
 dnl Based on the Internet Junkbuster originally written
@@ -28,6 +28,10 @@ dnl or write to the Free Software Foundation, Inc., 59
 dnl Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 dnl 
 dnl $Log: configure.in,v $
+dnl Revision 1.114  2008/04/06 15:18:33  fabiankeil
+dnl Oh well, rename the --enable-pcre-host-patterns option to
+dnl --enable-extended-host-patterns as it's not really PCRE syntax.
+dnl
 dnl Revision 1.113  2008/04/06 14:54:26  fabiankeil
 dnl Use PCRE syntax in host patterns when configured
 dnl with --enable-pcre-host-patterns.
@@ -521,7 +525,7 @@ dnl =================================================================
 dnl AutoConf Initialization
 dnl =================================================================
 
-AC_REVISION($Revision: 1.113 $)
+AC_REVISION($Revision: 1.114 $)
 AC_INIT(jcc.c)
 
 if test ! -f config.h.in; then
@@ -1348,17 +1352,19 @@ dnl This check is incomplete. For mingw32 zlib is found
 dnl by configure, but not necessarily by the compiler.
 dnl ====================================================
 AC_ARG_ENABLE(zlib,
-[  --enable-zlib                   Use an external zlib library to allow decompressing
-                                  data on the fly.],
+[  --disable-zlib                  Don't use zlib to decompress data before filtering.],
 [enableval2=$enableval],
-[enableval2=no])
+[enableval2=yes])
 if test $enableval2 = yes; then
-  AC_CHECK_LIB(z, zlibVersion, , [
-    AC_MSG_ERROR([Unable to find a copy of zlib. The zlib library
-is necessary to enable compresion support. ])
-  ]) 
-  AC_DEFINE(FEATURE_ZLIB,1,
-    [ Define to 1 to use compression through the zlib library. ])
+  AC_CHECK_LIB(z, zlibVersion, [have_zlib="yes"], [have_zlib="no"])
+  if test $have_zlib = "yes"; then
+    LIBS="$LIBS -lz"
+    AC_DEFINE(FEATURE_ZLIB,1,[Define to 1 to use compression through the zlib library.])
+  else
+   AC_MSG_WARN([No zlib found.
+   Privoxy will not be able to filter compressed content.
+   This may become a fatal error in the future.])
+  fi  
 fi