* Restored zlib.h support to WebCit
authorArt Cancro <ajc@citadel.org>
Thu, 29 Jan 2009 23:09:44 +0000 (23:09 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 29 Jan 2009 23:09:44 +0000 (23:09 +0000)
webcit/configure.ac

index 61353f819e4904e229bcaf2f8f50f006cf369a0f..657e272c7c5c7bfae74d8640869fbbf8a1c8a6dd 100644 (file)
@@ -101,6 +101,18 @@ dnl AC_FUNC_VPRINTF
 AC_REPLACE_FUNCS(snprintf)
 AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h iconv.h xlocale.h)
 
+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
+dnl  libcitadel will bring libz, so we don't need it here.     LDFLAGS="-lz $LDFLAGS" 
+       AC_DEFINE(HAVE_ZLIB, [], [define this if you have zlib compression available])
+fi
 
 dnl Here is the check for a libc integrated iconv
 AC_ARG_ENABLE(iconv,
@@ -456,4 +468,5 @@ AC_OUTPUT(Makefile po/Makefile )
 echo ------------------------------------------------------------------------
 echo 'Character set conversion support:' $ok_iconv
 echo 'National language support:       ' $ok_nls
+echo 'Compression support:             ' $ok_zlib
 echo