'Determines whether pkg-config exists on this machine.'

def __init__(self):

    if (sys.platform == 'win32'):
        self.has_pkgconfig = False
    else:
        try:
            self.pkg_config = os.environ['PKG_CONFIG']
        except KeyError:
            self.pkg_config = 'pkg-config'
        self.set_pkgconfig_path()
        (status, output) = getstatusoutput((self.pkg_config + '    --help'))
        self.has_pkgconfig = (status == 0)
        if (not self.has_pkgconfig):
            print('IMPORTANT    WARNING:')
            print('                pkg-config    is    not    installed.\n                matplotlib    may    not    be    able    to    find    some    of    its    dependencies')
