dnl Eggdrop compile-time configuration file for src/mod/compress.mod
dnl
dnl $Id: configure.in,v 1.2 2000/03/04 20:49:45 fabian Exp $

dnl This file is based on the autoconf m4 macros. Special eggdrop
dnl macros are used to optimise the size of the resulting configure
dnl script `./configure'.  Run `../eggautoconf' to update that
dnl script. You need to have the GNU autoconf package installed
dnl though.


dnl Instead of AC_INIT, we call EGG_INIT().
sinclude(../eggmod.m4)
EGG_INIT(compress.c)
AC_CONFIG_HEADER(compress_config.h)

AC_CHECK_LIB(z, gzopen, ZLIB="-lz", )
AC_CHECK_HEADER(zlib.h)

# Disable the module if either the header file or the library
# are missing.
if test "x${ZLIB}" = x; then
  cat >&2 <<EOF
configure: warning:

  Your system does not provide a working zlib compression library. The
  compress module will therefore be disabled.

EOF
  EGG_REMOVE_MOD(compress)
else
  if test "${ac_cv_header_zlib_h}" != yes; then
    cat >&2 <<EOF
configure: warning:

  Your system does not provide the necessary zlib header files. The
  compress module will therefore be disabled.

EOF
    EGG_REMOVE_MOD(compress)
  fi
fi
AC_FUNC_MMAP
AC_SUBST(ZLIB)

AC_OUTPUT(Makefile)
