* add gzip + configure detection -> re-bootstrap!
[citadel.git] / libcitadel / configure.in
index edfdf79428663df5348a257004b7cbf38baef49a..f2385cb2974f39a724f4788bcf3ba18ff838b243 100755 (executable)
@@ -58,6 +58,20 @@ dnl Checks for header files.
 AC_HEADER_STDC
 
 AC_CHECK_HEADER(sys/mman.h, [CFLAGS="$CFLAGS -D HAVE_MMAP"])
+AC_ARG_WITH(with_zlib,    [  --with-zlib             use zlib compression if present])
+dnl Checks for the zlib compression library.
+if test "x$with_zlib" != xno ; then
+        AC_CHECK_HEADERS(zlib.h,
+                [AC_CHECK_LIB(z, zlibVersion,
+                        [ok_zlib=yes],,
+        )])
+fi
+
+if test "x$ok_zlib" = xyes ; then
+        LIBS="-lz $LIBS"
+        AC_DEFINE(HAVE_ZLIB,[],[whether we have zlib])
+fi
+
 
 
 dnl Checks for typedefs, structures, and compiler characteristics.
@@ -74,3 +88,4 @@ abs_builddir="`pwd`"
 if test "$abs_srcdir" != "$abs_builddir"; then
   make mkdir-init
 fi
+echo 'zlib compression:                ' $ok_zlib