optional_depends zlib \
                 "--with-zlib" \
                 "--without-zlib" \
                 "for zlib support for mod_compress" &&

optional_depends bzip2 \
                 "--with-bzip2" \
                 "--without-bzip2" \
                 "for bzip2 support for mod_compress" &&

optional_depends pcre \
                 "--with-pcre" \
                 "--without-pcre" \
                 "for PCRE support" &&

optional_depends openldap \
                 "--with-ldap" \
                 "--without-ldap" \
                 "for OpenLDAP support" &&

optional_depends SSL \
                 "--with-openssl" \
                 "--without-openssl" \
                 "for OpenSSL support" &&

if is_depends_enabled $SPELL $(get_spell_provider $SPELL SSL); then
  optional_depends krb5 \
                   "--with-krb5" \
                   "--without-krb5" \
                   "to use Kerberos5 support with OpenSSL"
fi &&

optional_depends MYSQL \
                 "--with-mysql" \
                 "--without-mysql" \
                 "for MySQL support" &&

optional_depends postgresql \
                 "--with-pgsql" \
                 "--without-pgsql" \
                 "for PostgreSQL support" &&

optional_depends libdbi \
                 "--with-dbi" \
                 "--without-dbi" \
                 "for DBI support" &&

optional_depends LIBSASL \
                 "--with-sasl" \
                 "--without-sasl" \
                 "for SASL support" &&

optional_depends FAM \
                 "--with-fam" \
                 "--without-fam" \
                 "to reduce number of stat() calls" &&

optional_depends attr \
                 "--with-attr" \
                 "--without-attr" \
                 "for extended attribute support" &&

optional_depends LUA \
                 "--with-lua" \
                 "--without-lua" \
                 "for Lua engine support for mod_cml"  &&

optional_depends gdbm \
                 "--with-gdbm" \
                 "--without-gdbm" \
                 "for GDBM storage for mod_trigger_b4_dl" &&

optional_depends libmemcached \
                 "--with-memcached" \
                 "--without-memcached" \
                 "for memcached storage for mod_trigger_b4_dl" &&

optional_depends libev \
                 "--with-libev" \
                 "--without-libev" \
                 "for fdevent handlers support" &&

optional_depends libunwind \
                 "--with-libunwind" \
                 "--without-libunwind" \
                 "for libunwind support for backtraces on assert failures" &&

optional_depends valgrind \
                 "--with-valgrind" \
                 "--without-valgrind" \
                 "for internal valgrind support" &&

if list_find "$LIGHTTPD_OPTS" "--with-webdav-props"; then
  depends libxml2 '--with-libxml'
  depends sqlite '--with-sqlite'
fi &&

if list_find "$LIGHTTPD_OPTS" "--with-webdav-locks"; then
  depends util-linux '--with-uuid'
fi
