The variable set by PKG_PROG_PKG_CONFIG which points to the pkg-config utility is PKG_CONFIG, not PKGCONFIG. The latter was previously used when trying to detect the presence of the MagickWand library when Window Maker was built using --enable-magick.