depends xorg-libs &&
depends freetype2 &&

optional_depends  scim \
                  "--enable-scim" \
                  "" \
                  "for SCIM i18n input support" &&

optional_depends  iiimf-canna \
                  "--enable-iiimf" \
                  "" \
                  "for IIIMF (Internet/Intranet Input Method Framework) support" &&

optional_depends  fribidi \
                  "--enable-fribidi" \
                  "" \
                  "for Fribidi BiDi rendering support" &&

optional_depends  gtk+2 \
                  "" \
                  "" \
                  "for GUI configurator mlconfig and mlterm-menu" &&

optional_depends  libxft \
                  "--with-type-engines=xft" \
                  "" \
                  "to use xft for rendering text" &&

# why not just depend on the spells and make it easy? This way dispel 
# works better, as mlterm is not borked because of missing image support
config_query_list ML_IMAGE "What should provide image support?" nothing imlib gdk-pixbuf &&
if [[ $ML_IMAGE == imlib ]]; then
  optional_depends  imlib \
                  "--with-imagelib=imlib" \
                  "" \
                  "for background image support - say y"
elif [[ $ML_IMAGE == gdk-pixbuf ]]; then
  optional_depends  gdk-pixbuf \
                  "--with-imagelib=gdk-pixbuf2" \
                  "" \
                  "for background image support - say y"
fi
