depends courier-authlib &&
depends pcre &&
depends perl &&
depends mime-support &&

case  "${COURIER_DBLIB}"  in
  "gdbm")  depends gdbm "--with-db=gdbm"
     ;;
  "db")  depends db "--with-db=db"
     ;;
esac &&

optional_depends "fam"   \
                 ""      \
                 ""      \
                 "for enhanced IMAP idle implementation" &&

optional_depends "openssl" \
                 "" \
                 "" \
                 "for SSL/TLS encrypted mail delivery support" &&

optional_depends "openldap" \
                 ""        \
                 ""        \
                 "for LDAP directory services" &&

if [ "${COURIER_WEBMAIL}" == "y" ]; then
  depends WEBSERVER &&

  if [ "${COURIER_SSLWEBMAIL}" != "no" ]; then
    depends openssl
  fi &&

  if [ "${COURIER_SPELLCHECKER}" != "" ]; then
    depends ${COURIER_SPELLCHECKER} "--with-ispell=${COURIER_SPELLCHECKER}"
  fi
fi &&

if [ "${COURIER_FAXES}" == "y" ]; then
  depends mgetty &&
  depends groff &&

  optional_depends "POSTSCRIPT-INTERPRETER" \
                   ""                       \
                   ""                       \
                   "to send e-mail via fax - Postscript and PDF support" &&

  optional_depends "netpbm" \
                   ""       \
                   ""       \
                   "to send e-mail via fax - GIF, JPEG and PNG support"
fi &&

optional_depends "uucp" \
                 ""     \
                 ""     \
                 "for using Courier as a gateway to or from another UUCP server"
