depends zlib &&
depends util-linux &&
depends lzo &&
depends setuptools &&

optional_depends acl \
                 "--enable-convert" \
                 "--disable-convert" \
                 "for btrfs-convert utility" &&

if is_depends_enabled $SPELL acl; then
  depends e2fsprogs
fi &&

optional_depends libgcrypt "--with-crypto=libgcrypt" "" \
                           "for libgcrypt as crypto backend" &&
if ! is_depends_enabled "${SPELL}" "libgcrypt"; then
  optional_depends libsodium "--with-crypto=libsodium" "--with-crypto=builtin" \
                             "for libsodium as crypto backend"
fi &&

optional_depends xmlto \
                 "--enable-documentation" \
                 "--disable-documentation" \
                 "to build documentation" &&

if is_depends_enabled $SPELL xmlto; then
  depends asciidoc                              &&
  depends babel                                 &&
  depends python-sphinx                         &&
  depends python-sphinxcontrib-applehelp        &&
  depends python-sphinxcontrib-devhelp          &&
  depends python-sphinxcontrib-htmlhelp         && # See https://github.com/sphinx-doc/sphinx/issues/9434
  depends python-sphinxcontrib-qthelp           &&
  depends python-sphinxcontrib-serializinghtml     # See https://github.com/sphinx-doc/sphinx/issues/9434
fi &&

if [[ "$BTRFS_PROGS_BRANCH" == scm ]]; then
  depends autoconf &&
  depends automake &&
  depends git
fi &&

optional_depends zstd \
                 "--enable-zstd" \
                 "--disable-zstd" \
                 "for zstd compression"
