From cbf36fcf650c83a0c9933dffbf746151e71771d2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sun, 5 Oct 2008 19:42:49 +0000 Subject: [PATCH] * reorder zlib detection --- webcit/configure.ac | 29 +++++++++++++++-------------- webcit/debian/rules | 8 +------- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/webcit/configure.ac b/webcit/configure.ac index 3ac9f2eb0..6a5261d9a 100644 --- a/webcit/configure.ac +++ b/webcit/configure.ac @@ -24,7 +24,6 @@ else ssl_dir="$prefix/keys" fi -AC_ARG_WITH(with_zlib, [ --with-zlib use zlib compression if present]) AC_ARG_WITH(ssl, [ --with-ssl=PATH Specify path to OpenSSL installation ], [ @@ -159,6 +158,21 @@ fi AC_CHECK_LIB(intl, libintl_bindtextdomain, [LDFLAGS="$LDFLAGS -lintl"]) +dnl Checks for the zlib compression library. +AC_ARG_WITH(with_zlib, [ --with-zlib use zlib compression if present]) +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 Check for libcitadel AC_CHECK_HEADER(libcitadel.h, [AC_CHECK_LIB(citadel, libcitadel_version_string, @@ -193,19 +207,6 @@ AC_CHECK_HEADER(libical/ical.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 - LIBS="-lz $LIBS" - AC_DEFINE(HAVE_ZLIB,[],[whether we have zlib]) -fi - # The big search for OpenSSL if test "$with_ssl" != "no"; then diff --git a/webcit/debian/rules b/webcit/debian/rules index 649784d26..c837f23f9 100755 --- a/webcit/debian/rules +++ b/webcit/debian/rules @@ -15,12 +15,6 @@ EXTRA_ARGS= PROFILE_ARGS= #to enable debugging: export DEB_BUILD_OPTIONS="debug profiling compression urldebug" - -ifneq (,$(findstring compression,$(DEB_BUILD_OPTIONS))) - ZLIB_ARGS=--without-zlib -else - ZLIB_ARGS=--with-zlib -endif ifneq (,$(findstring profiling,$(DEB_BUILD_OPTIONS))) PROFILE_ARGS= --with-gprof endif @@ -48,7 +42,7 @@ configure-stamp: --with-rundir=/var/run/citadel \ --with-ical --with-db --with-ldap \ --with-ssldir=/etc/ssl/webcit/ \ - $(ZLIB_ARGS) --with-ssl --with-libiconf \ + --with-ssl --with-libiconf \ --with-newt --with-included-gettext \ --with-datadir=/var/run/citadel \ --enable-debug $(EXTRA_ARGS) $(PROFILE_ARGS) -- 2.30.2