source $GRIMOIRE/depends_one_of.function &&

depends -sub CXX gcc  &&
depends JPEG &&
if [[ "${GNUPLOT_BRANCH}" == "scm" ]]; then
  depends git
fi &&

# gnuplot uses gd for rendering pngs, even with true type fonts...
optional_depends  "gd"                 \
                  "--with-gd"   \
                  "--without-gd"          \
                  "for png output support" &&

optional_depends "readline"                                 \
		  "--with-readline=gnu" \
                  "--with-readline=builtin"                 \
                  "use gnu readline instead of builtin readline" &&

optional_depends xorg-libs --with-x --without-x "X11 output" &&
optional_depends wxgtk-3.2 \
                 --enable-wxwidgets \
                 --disable-wxwidgets \
                 "wxWidgets interactive terminal" &&

optional_depends svgalib               \
                 "--with-linux-vga"    \
                 "--without-linux-vga" \
                 "Linux SVGA console driver?" &&

optional_depends lua "--with-lua" "--without-lua" \
                 "lua/TikZ terminal" &&

optional_depends cairo "--with-cairo" "--without-cairo" \
                 "cairo-based terminals" &&

optional_depends_one_of QTTERM \
                 qt6base "--with-qt=qt6" \
                 qtbase "--with-qt=qt5" \
                 "--without-qt" \
                 "Qt-based interactive terminal" &&

optional_depends libcaca "--with-caca" "--without-caca" \
                 "for Caca output" &&

optional_depends libcerf "--with-libcerf" "--without-libcerf" \
                 "for special functions from libcerf" &&

optional_depends texlive "--with-latex" "--without-latex" \
                 "for LaTeX support" &&

if is_depends_enabled $SPELL qt6base; then
  depends qt6svg
fi &&

if is_depends_enabled $SPELL qtbase; then
  depends qtsvg
fi &&

if is_depends_enabled $SPELL wxgtk-3.2; then
  depends cairo &&
  depends pango
fi
