]> code.citadel.org Git - citadel.git/blobdiff - citadel/configure.ac
* autoconf to look for zlib (for an upcoming experiment)
[citadel.git] / citadel / configure.ac
index eebf7af895199e3cdf95d83f63ec20e20de0f015..fdf845fa788c2acb2df6accffd7122ec7717c003 100644 (file)
@@ -31,6 +31,8 @@ AC_ARG_WITH(ssl,
 )
 AC_ARG_WITH(ncurses, [  --without-ncurses       don't use ncurses])
 
+AC_ARG_WITH(with_zlib, [  --with-zlib             use zlib compression if present])
+
 if test "x$with_gdbm" != xno -a "x$with_gdbm" != xyes -a "$with_gdbm"; then
        db_dir="$with_gdbm"
        with_gdbm=yes
@@ -364,6 +366,19 @@ if test "x$with_gdbm" != xno -a "x$with_db" != xyes; then
                 with_db=no])
 fi
 
+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" != xno ; then
+       LIBS="-lz $LIBS"
+       AC_DEFINE(HAVE_ZLIB)
+fi
+
 dnl Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_STDC