Merge branch 'master' of https://github.com/vapier/swig

Use $PKGCONFIG instead of hard-coded pkg-config for JS test.

See https://github.com/swig/swig/pull/1796
diff --git a/CHANGES.current b/CHANGES.current
index 5ca41fc..364ec38 100644
--- a/CHANGES.current
+++ b/CHANGES.current
@@ -7,6 +7,9 @@
 Version 4.0.2 (in progress)
 ===========================
 
+2020-05-24: vapier
+            [JS] #1796 Fix pkg-config invocation in configure.
+
 2020-02-18: ryannevell
             [Lua] #1728 Add support for LUA lightuserdata to SWIG_Lua_ConvertPtr.
 
diff --git a/configure.ac b/configure.ac
index ab7de51..fde5a01 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1597,7 +1597,7 @@
 
   if test -z "$JSCORELIB" -a -n "$PKGCONFIG"; then
     AC_MSG_CHECKING(for JavaScriptCore/Webkit library)
-    if pkg-config javascriptcoregtk-1.0; then
+    if $PKGCONFIG javascriptcoregtk-1.0; then
       JSCORELIB=`$PKGCONFIG --libs javascriptcoregtk-1.0`
       JSCOREVERSION=`$PKGCONFIG --modversion javascriptcoregtk-1.0`
     fi