meson.build: xxf86vm is not needed for -Dglx-direct=false

It is only used in src/glx/glxcmds.c and when GLX_DIRECT_RENDERING is
defined.
So only depend on it if GLX direct rendering is actually enabled.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1905>
diff --git a/meson.build b/meson.build
index 3cb3c90..f1e4118 100644
--- a/meson.build
+++ b/meson.build
@@ -1779,7 +1779,9 @@
   if with_glx == 'dri'
     if with_dri_platform == 'drm'
       dep_dri2proto = dependency('dri2proto', version : '>= 2.8')
-      dep_xxf86vm = dependency('xxf86vm')
+      if with_glx_direct
+        dep_xxf86vm = dependency('xxf86vm')
+      endif
     endif
   endif
   if (with_egl or 
@@ -1847,7 +1849,9 @@
     'xcb-glx >= 1.8.1']
   if with_dri_platform == 'drm'
     gl_priv_reqs += 'xcb-dri2 >= 1.8'
-    gl_priv_reqs += 'xxf86vm'
+    if with_glx_direct
+      gl_priv_reqs += 'xxf86vm'
+    endif
   endif
 endif
 if dep_libdrm.found()