case "$EMACS_XTOOLKIT" in
  lucid)
    optional_depends xaw3d                \
      --with{,out}-xaw3d                  \
      "for fancy 3D-style scroll bars"    &&
    if ! is_depends_enabled $SPELL xaw3d; then
      depends libxaw
    fi
    ;;
  gtk)
    depends gtk+2
    ;;
  gtk3)
    depends gtk+3
    ;;
  motif)
    depends MOTIF
    ;;
esac &&

optional_depends "imlib"                               \
                 ""                                    \
                 ""                                    \
                 "lets Emacs use its own color allocation functions" &&

optional_depends "libpng"                              \
                 "--with-png"                          \
                 "--without-png"                       \
                 "for PNG format support"              &&

optional_depends "JPEG"                                \
                 "--with-jpeg"                         \
                 "--without-jpeg"                      \
                 "for JPEG format support"             &&

optional_depends "tiff"                                \
                 "--with-tiff"                         \
                 "--without-tiff"                      \
                 "for TIFF format support"             &&

optional_depends GIFLIB                                \
                 "--with-gif"                          \
                 "--without-gif"                       \
                 "for GIF format support"              &&

optional_depends libxpm                                \
                 --with-xpm                            \
                 --without-xpm                         \
                 "for XPM (X pixmap) suport"           &&

optional_depends librsvg2                              \
                 --with-rsvg                           \
                 --without-rsvg                        \
                 "for SVG (Scalable Vector Graphics) support" &&

optional_depends imagemagick                           \
                 --with-imagemagick                    \
                 --without-imagemagick                 \
                 "for ImageMagick image support"       &&

optional_depends "gpm"                                 \
                 "--with-gpm"                          \
                 "--without-gpm"                       \
                 "for mouse support on a GNU/Linux console"  &&

optional_depends libxml2                               \
                 --with-xml2                           \
                 --without-xml2                        \
                 "for XML parsing support"             &&

optional_depends libxft                                \
                 --with-xft                            \
                 --without-xft                         \
                 "for XFT anti-aliased font support"   &&

#optional_depends libotf                                \
#                 --with-libotf                         \
#                 --without-libotf                      \
#                 "for OpenType font support"           &&

optional_depends dbus                                  \
                 --with-dbus                           \
                 --without-dbus                        \
                 "for D-Bus support"                   &&

optional_depends gconf2                                \
                 --with-gconf                          \
                 --without-gconf                       \
                 "for GConf support"                   &&

optional_depends libselinux                            \
                 --with-selinux                        \
                 --without-selinux                     \
                 "for SELinux support"                 &&

optional_depends gnutls                                \
                 --with-gnutls                         \
                 --without-gnutls                      \
                 "for SSL/TLS support"                 &&

if [[ "$EMACS_BRANCH" == "scm" ]]; then
  depends git
fi
