* autoconf to look for zlib (for an upcoming experiment)
authorArt Cancro <ajc@citadel.org>
Thu, 8 Aug 2002 22:01:35 +0000 (22:01 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 8 Aug 2002 22:01:35 +0000 (22:01 +0000)
citadel/ChangeLog
citadel/configure.ac

index 8637c396d08dbd6f19d12b1d6fb505ebf393f25c..133587141dcebc3ad4aacaf855c0e584803a8c45 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 591.85  2002/08/08 22:01:35  ajc
+ * autoconf to look for zlib (for an upcoming experiment)
+
  Revision 591.84  2002/08/08 03:25:56  ajc
  * Bugfix for above
  * Started writing some infrastructure for sub/unsub
@@ -3877,3 +3880,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
+
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