anchor.diff:      "--enable-shared-glapi" "--enable-shared-gallium"
       "--enable-driglx-direct" # seems enabled anyway
       "--enable-gallium-llvm" "--with-llvm-shared-libs"
  +    "--enable-xa" # used in vmware driver
   
       "--with-dri-drivers=i965,r200,radeon"
       "--with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast" # radeonsi complains about R600 missing in LLVM
  
positive.code: , libdrm, xorg, wayland, udev, llvm, libffi
  , libvdpau
  , enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt
  , enableR600LlvmCompiler ? false
  }:
  
  if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then
  
negative.code:   ]
      ++ optional enableR600LlvmCompiler "--enable-r600-llvm-compiler" # complains about R600 missing in LLVM
      ++ optional enableTextureFloats "--enable-texture-float"
      ++ optionals enableExtraFeatures [
        "--enable-gles1" "--enable-gles2"
        "--enable-osmesa"
        "--enable-openvg" "--enable-gallium-egl" # not needed for EGL in Gallium, but OpenVG might be useful
        #"--enable-xvmc" # tests segfault with 9.1.{1,2,3}
        "--enable-vdpau"
        #"--enable-opencl" # ToDo: opencl seems to need libclc for clover
      ];
  