depends JPEG &&
depends openjpeg &&
depends freetype2 &&
depends harfbuzz &&
depends jbig2dec &&
depends mujs 'USE_SYSTEM_MUJS=yes' &&
depends zlib &&
depends gumbo-parser &&

optional_depends libx11 "HAVE_X11=yes" "HAVE_X11=no HAVE_GLUT=no" \
                        "to build X11 client" &&
if is_depends_enabled "${SPELL}" "libx11"; then
  depends libxext &&

  optional_depends GLUT "HAVE_GLUT=yes" "" "for OpenGL-based viewer" &&
  if is_depends_enabled ${SPELL} $(get_spell_provider ${SPELL} GLUT); then
    depends OPENGL
  fi
fi &&

optional_depends SSL \
                 "HAVE_OPENSSL=yes" \
                 "HAVE_OPENSSL=no" \
                 "for signature support" &&

optional_depends curl \
                 "HAVE_CURL=yes" \
                 "HAVE_CURL=no" \
                 "for progressive loading support" &&

optional_depends brotli     'brotli=1' '' 'Brotli support' &&
optional_depends leptonica  \
                 'HAVE_SYS_LEPTONICA=yes' \
                 'HAVE_SYS_LEPTONICA=no' \
                 'OCR support' &&
optional_depends libarchive \
                 'HAVE_SYS_LIBARCHIVE=yes' \
                 'HAVE_SYS_LIBARCHIVE=no' \
                 'archive support' &&
optional_depends tesseract  \
                 'HAVE_SYS_TESSERACT=yes' \
                 'HAVE_SYS_TESSERACT=no' \
                 'OCR support' &&
optional_depends zxing-cpp  \
                 'HAVE_SYS_ZXINGCPP=yes' \
                 'HAVE_SYS_ZXINGCPP=no' \
                 'Barcode support'
