Add a variable for deciding when to use openmax_dl.

Modifies the previous condition to additionally not use openmax_dl on
iOS. Remove the All target's direct dependency on it, as it is now
pulled in by the targets that need it.

Add gn support since an openmax_dl gn target is available.

BUG=chromium:415393, webrtc:3906
R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/23949004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7397 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/common_audio/BUILD.gn b/webrtc/common_audio/BUILD.gn
index 36740e8..9091c42 100644
--- a/webrtc/common_audio/BUILD.gn
+++ b/webrtc/common_audio/BUILD.gn
@@ -90,21 +90,16 @@
 
   deps = [ "../system_wrappers" ]
 
-  # TODO(ajm): Enable when GN support for openmax_dl is added.
-  # See: crbug.com/419206
-  # Not needed immediately, since nothing built by GN depends on these bits.
-  # TODO(ajm): Workaround until openmax_dl has non-Android ARM support.
-  # See: crbug.com/415393
-  #if (cpu_arch != "arm" or (cpu_arch == "arm" and is_android)) {
-  #  'sources' += [
-  #    'lapped_transform.cc',
-  #    'lapped_transform.h',
-  #    'real_fourier.cc',
-  #    'real_fourier.h',
-  #  ]
-  #
-  #  deps += [ "//third_party/openmax_dl/dl" ]
-  #}
+  if (rtc_use_openmax_dl) {
+    sources += [
+      "lapped_transform.cc",
+      "lapped_transform.h",
+      "real_fourier.cc",
+      "real_fourier.h",
+    ]
+
+    deps += [ "//third_party/openmax_dl/dl" ]
+  }
 
   if (cpu_arch == "arm") {
     sources += [