depends xorgproto &&
depends -sub "INTEL" libdrm &&
depends XSERVER &&
depends util-macros &&
depends libpciaccess &&

# Dunno what to do about that DRI/-sub DRI MESA business. It's a bit crazy.
# Let's configure figure that out. Actually, the DRI choice is nicely
# propagated from the Xorg infrastructure. Do we really need to
# prescibe things here? Let's just build that crap! -- ThOr
#if spell_ok -sub DRI MESA; then
#  persistent_read -sub DRI MESA MESALIB_BUILD MESALIB_BUILD || true
#fi &&

#if [[ $MESALIB_BUILD == dri ]]; then
#  depends -sub "DRI" -sub DRI MESA "--enable-dri" &&
#  depends -sub "DRI" XSERVER
#else
#  depends -sub DRI MESA "--disable-dri"
#fi &&

optional_depends libxvmc \
                 "--enable-xvmc" \
                 "--disable-xvmc" \
                 "for XvMC support" &&

# Still coupled? -- ThOr

optional_depends DEVICE-MANAGER \
                 "--enable-udev" \
                 "--disable-udev" \
                 "for udev-based monitor hotplug detection support" &&

if [[ "$XF86_VIDEO_INTEL_BRANCH" == "scm" ]]; then
  depends autoconf &&
  depends automake
fi
