if [[ "${NEOMUTT_BRANCH}" == "scm" ]]; then
  depends git
fi &&

depends ncurses &&

persistent_remove TMP_NEOMUTT_OPTS &&

optional_depends   "MAIL-TRANSPORT-AGENT"                       \
                   ""                                           \
                   ""                                           \
                   "to send mail"                               &&


optional_depends   "GNUPG"                                      \
                   ""                                           \
                   "--disable-pgp"                              \
                   "to support PGP signing and encrypting messages" &&

# Do NOT add --ssl here, that only works if POP/IMAP are used.  This is
# mostly just here to prompt for SSL if they don't have it and want
# S/MIME.
optional_depends "SSL"                                        \
                 ""                                           \
                 "--disable-smime"                            \
                 "to support S/MIME signing and encrypting messages" &&

optional_depends "gpgme"                                      \
                 "--gpgme"                                    \
                 ""                                           \
                 "alternate backend for PGP and S/MIME"       &&

if is_depends_enabled "${SPELL}" "gpgme"; then
  depends "libgpg-error"
fi &&

case ${HCACHE_BACKEND} in
    db)
        depends "${HCACHE_BACKEND}" "--bdb" ;;
  lmdb)
        depends "${HCACHE_BACKEND}" "--lmdb"  ;;
  gdbm)
        depends "${HCACHE_BACKEND}" "--gdbm"  ;;
     *)
        ;;
 esac &&

optional_depends "tokyocabinet"                               \
                 "--tokyocabinet"                             \
                 ""                                           \
                 "Use tokyocabinet?"                          &&

optional_depends "kyotocabinet"                               \
                 "--kyotocabinet"                             \
                 ""                                           \
                 "Use kyotocabinet?"                          &&

optional_depends "qdbm"                                       \
                 "--qdbm"                                     \
                 ""                                           \
                 "Use kyotocabinet?"                          &&

optional_depends "libidn"                                     \
                 ""                                           \
                 "--disable-idn"                              \
                 "to use GNU libidn for domain names"         &&

optional_depends "libidn2"                                    \
                 "--idn2"                                     \
                 "--disable-idn2"                             \
                 "to use GNU libidn2 for domain names"        &&


optional_depends "gnutls"                                     \
                 "--gnutls"                                   \
                 ""                                           \
                 "to enable SSL support for POP/IMAP via gnutls" &&
if ! is_depends_enabled "${SPELL}" "gnutls"; then
  # If they have POP/IMAP then prompt again for SSL to get --ssl.
  optional_depends "SSL"                                      \
                   "--ssl"                                    \
                   ""                                         \
                   "to enable SSL support for POP/IMAP"
fi &&

optional_depends "LIBSASL"                                   \
                 "--sasl"                                    \
                 ""                                          \
                 "to enable SASL2 authentication for POP/IMAP" &&

optional_depends "krb5"                                       \
                 "--gss"                                      \
                 ""                                           \
                 "to enable GSSAPI authentication for IMAP"   &&
                
optional_depends "LUA"                                        \
                 "--lua"                                      \
                 ""                                           \
                 "for Lua scripting"                          &&

optional_depends "notmuch"                                    \
                 "--notmuch"                                  \
                 ""                                           \
                 "Enable NOTMUCH support"                     &&

optional_depends "docbook-dtd"                                \
                 ""                                           \
                 "--disable-doc"                              \
                 "to build documentation"                     &&

optional_depends "PKG-CONFIG"                                 \
                 "--pkgconf"                                  \
                 ""                                           \
                 "to obtain package information"              &&

optional_depends "sqlite"                                     \
                 "--sqlite"                                   \
                 ""                                           \
                 "Enable SQLite support"
