GN: Add common configs to all targets.

This is needed to ensure we have the same build with GN
as with GYP, since GYP includes the common.gypi on a global level.
Several fixes has been needed in the past because some code have
been built without the right defines.

BUG=3441
R=brettw@chromium.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7317 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_coding/BUILD.gn b/webrtc/modules/audio_coding/BUILD.gn
index 8972ff9..b3c954d 100644
--- a/webrtc/modules/audio_coding/BUILD.gn
+++ b/webrtc/modules/audio_coding/BUILD.gn
@@ -81,7 +81,12 @@
 
   defines = []
 
-  direct_dependent_configs = [ ":audio_coding_config" ]
+  configs += [ "../..:common_config" ]
+
+  public_configs = [
+    "../..:common_inherited_config",
+    ":audio_coding_config",
+  ]
 
   if (is_clang) {
     # Suppress warnings from Chrome's Clang plugins.
@@ -123,7 +128,12 @@
     "codecs/cng/webrtc_cng.c",
   ]
 
-  direct_dependent_configs = [ ":cng_config" ]
+  configs += [ "../..:common_config" ]
+
+  public_configs = [
+    "../..:common_inherited_config",
+    ":cng_config",
+  ]
 
   deps = [ "../../common_audio" ]
 }
@@ -143,7 +153,12 @@
     "codecs/g711/g711.h",
   ]
 
-  direct_dependent_configs = [ ":g711_config" ]
+  configs += [ "../..:common_config" ]
+
+  public_configs = [
+    "../..:common_inherited_config",
+    ":g711_config",
+  ]
 }
 
 config("g722_config") {
@@ -162,7 +177,12 @@
     "codecs/g722/g722_enc_dec.h",
   ]
 
-  direct_dependent_configs = [ ":g722_config" ]
+  configs += [ "../..:common_config" ]
+
+  public_configs = [
+    "../..:common_inherited_config",
+    ":g722_config",
+  ]
 }
 
 config("ilbc_config") {
@@ -315,7 +335,12 @@
     "codecs/ilbc/xcorr_coef.h",
   ]
 
-  direct_dependent_configs = [ ":ilbc_config" ]
+  configs += [ "../..:common_config" ]
+
+  public_configs = [
+    "../..:common_inherited_config",
+    ":ilbc_config",
+  ]
 
   deps = [ "../../common_audio" ]
 }
@@ -384,9 +409,12 @@
     libs = [ "m" ]
   }
 
-  configs += [ "../..:common_inherited_config" ]
+  configs += [ "../..:common_config" ]
 
-  direct_dependent_configs = [ ":isac_config" ]
+  public_configs = [
+    "../..:common_inherited_config",
+    ":isac_config",
+  ]
 
   deps = [ "../../common_audio" ]
 }
@@ -446,7 +474,12 @@
     defines = [ "WEBRTC_LINUX" ]
   }
 
-  direct_dependent_configs = [ ":isac_fix_config" ]
+  configs += [ "../..:common_config" ]
+
+  public_configs = [
+    "../..:common_inherited_config",
+    ":isac_fix_config",
+  ]
 
   deps = [
     "../../common_audio",
@@ -540,6 +573,9 @@
       "-mfpu=neon",
     ]
 
+    configs += [ "../..:common_config" ]
+    public_configs = [ "../..:common_inherited_config" ]
+
     deps = [ "../../common_audio" ]
   }
 }
@@ -557,7 +593,12 @@
     "codecs/pcm16b/pcm16b.c",
   ]
 
-  direct_dependent_configs = [ ":pcm16b_config" ]
+  configs += [ "../..:common_config" ]
+
+  public_configs = [
+    "../..:common_inherited_config",
+    ":pcm16b_config",
+  ]
 }
 
 config("opus_config") {
@@ -573,7 +614,8 @@
   if (build_with_mozilla) {
     include_dirs = [ getenv("DIST") + "/include/opus" ]
   } else {
-    configs += [ "../..:common_inherited_config" ]
+    configs += [ "../..:common_config" ]
+    public_configs = [ "../..:common_inherited_config" ]
 
     deps = [ "//third_party/opus" ]
   }
@@ -658,7 +700,12 @@
     "neteq/time_stretch.h",
   ]
 
-  direct_dependent_configs = [ ":neteq_config" ]
+  configs += [ "../..:common_config" ]
+
+  public_configs = [
+    "../..:common_inherited_config",
+    ":neteq_config",
+  ]
 
   forward_dependent_configs_from = [ "//third_party/opus" ]