entd: Respect PKG_CONFIG variable if set in the environment.

This is required for the new cross-compilation support using pkg-config
wrappers instead of changing the pkg-config files themselves.

BUG=chromium-os:16245
TEST=Compile entd on arm with and without PKG_CONFIG variable set.
     When the *.pc files don't have SYSROOT hardcoded into them,
     using the PKG_CONFIG wrapper ensures that we look in the board
     for libs instead of /usr/lib.

Change-Id: Iaff59b826aa059b7f6138de301004d82c763ac0d
Reviewed-on: http://gerrit.chromium.org/gerrit/2222
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: David James <davidjames@chromium.org>
diff --git a/SConstruct b/SConstruct
index bb7a904..36291ce 100644
--- a/SConstruct
+++ b/SConstruct
@@ -33,7 +33,10 @@
     LINKFLAGS=['-L${V8_LIB}'],
    )
 
-  env.ParseConfig('pkg-config --cflags --libs libcurl dbus-glib-1 libpcrecpp')
+  pkgconfig = os.environ.get('PKG_CONFIG', 'pkg-config')
+  env.ParseConfig(
+      pkgconfig + ' --cflags --libs libcurl dbus-glib-1 libpcrecpp'
+  )
 
   end_program = env.Program(
       '${BUILD_DIR}/entd',