build: Embed setting of PKG_CONFIG_PATH variable to commonly used values

Change-Id: I8f70e1bedad13f77bbd40ab53d2e31717836a667
Refs: #2178
diff --git a/docs/INSTALL.rst b/docs/INSTALL.rst
index e28d227..76ccaf9 100644
--- a/docs/INSTALL.rst
+++ b/docs/INSTALL.rst
@@ -201,23 +201,13 @@
     ./waf
     sudo ./waf install
 
-Some platforms, such as OS X with MacPorts and certain Linux distributions (e.g., Fedora)
-require setting the ``PKG_CONFIG_PATH`` before running configure.
-
-For example, on OS X with MacPorts (assuming the default ``/opt/local`` MacPorts path):
+If you have installed `ndn-cxx` library and/or other dependencies into a non-standard paths, you
+may need to modify ``PKG_CONFIG_PATH`` environment variable before running ``./waf configure``.
+For example,
 
 ::
 
-    export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH
-    ./waf configure
-    ./waf
-    sudo ./waf install
-
-or some Linux distributions:
-
-::
-
-    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig:$PKG_CONFIG_PATH
+    export PKG_CONFIG_PATH=/custom/lib/pkgconfig:$PKG_CONFIG_PATH
     ./waf configure
     ./waf
     sudo ./waf install
diff --git a/wscript b/wscript
index d2aff10..548fad3 100644
--- a/wscript
+++ b/wscript
@@ -63,6 +63,10 @@
 
     conf.find_program('bash', var='BASH')
 
+    if not os.environ.has_key('PKG_CONFIG_PATH'):
+        os.environ['PKG_CONFIG_PATH'] = ':'.join([
+            '/usr/local/lib/pkgconfig',
+            '/opt/local/lib/pkgconfig'])
     conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'],
                    uselib_store='NDN_CXX', mandatory=True)