Consistently pass through PKG_CONFIG_LIBDIR environment variable

PKG_CONFIG_LIBDIR is set by dpkg-buildpackage, and needs to be passed
through to pkg-config for successful cross-building.

Review URL: http://codereview.chromium.org/524073
diff --git a/SConstruct b/SConstruct
index 0d124d9..1f7ff0f 100644
--- a/SConstruct
+++ b/SConstruct
@@ -67,6 +67,12 @@
 env['CPPPATH'] = ['..', '../../third_party/chrome/files', '../../common']
 env['LIBPATH'] = ['../../third_party/chrome']
 env['BUILDERS']['ProtocolBuffer'] = proto_builder
+
+# Fix issue with scons not passing pkg-config vars through the environment.
+for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH'):
+  if os.environ.has_key(key):
+    env['ENV'][key] = os.environ[key]
+
 env.ParseConfig('pkg-config --cflags --libs glib-2.0')
 env.ProtocolBuffer('update_metadata.pb.cc', 'update_metadata.proto')