depends NINJA-BUILD &&

optional_depends pkgconf \
                 "libpkgconf=enabled" \
                 "libpkgconf=disabled" \
                 "for dependency discovery with pkg-config files" &&

if ! is_depends_enabled ${SPELL} pkgconf; then
  depends PKG-CONFIG "libpkgconf=disabled"
fi &&

if [[ ${MUON_MESON_REFERENCE} == y ]]; then
  depends curl "libcurl=enabled" &&
  depends libarchive "libarchive=enabled" &&
  depends scdoc "docs=enabled" &&
  depends python3 &&
  depends pyyaml
else
  optional_depends curl \
                   "libcurl=enabled" \
                   "libcurl=disabled" \
                   "for fetching wraps" &&

  optional_depends libarchive \
                   "libarchive=enabled" \
                   "libarchive=disabled" \
                   "for extracting wrap archives" &&

  optional_depends scdoc \
                   "docs=enabled" \
                   "docs=disabled" \
                   "to build documentation"
fi &&

if ! is_depends_enabled ${SPELL} pkgconf && \
   (is_depends_enabled ${SPELL} curl || \
   is_depends_enabled ${SPELL} libarchive || \
   is_depends_enabled ${SPELL} scdoc); then
  depends pkgconf "libpkgconf=enabled" &&

  message "${MESSAGE_COLOR}Enforced pkgconf because of selected dependencies${DEFAULT_COLOR}"
fi
