Make building with X11 libraries optional.

Desktop capturing on Linux will be disabled in this case, but everything
can be built without any X11 development libraries installed.

BUG=webrtc:5716,webrtc:8319

Change-Id: I01bd6a4b02816b407be19476e22ff073d264b496
Reviewed-on: https://webrtc-review.googlesource.com/32360
Reviewed-by: Henrik Andreassson (OOO until Jan 2) <henrika@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Joachim Bauch <jbauch@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21462}
diff --git a/test/BUILD.gn b/test/BUILD.gn
index ab31e99..7e929e8 100644
--- a/test/BUILD.gn
+++ b/test/BUILD.gn
@@ -685,17 +685,17 @@
     "../rtc_base:rtc_base_approved",
     "//testing/gtest",
   ]
-  if (!(is_linux && use_x11) && !is_mac && !is_win) {
+  if (!(is_linux && rtc_use_x11) && !is_mac && !is_win) {
     sources += [ "null_platform_renderer.cc" ]
   }
-  if ((is_linux && use_x11) || is_mac) {
+  if ((is_linux && rtc_use_x11) || is_mac) {
     sources += [
       "gl/gl_renderer.cc",
       "gl/gl_renderer.h",
     ]
   }
 
-  if (is_linux && use_x11) {
+  if (is_linux && rtc_use_x11) {
     sources += [
       "linux/glx_renderer.cc",
       "linux/glx_renderer.h",