def detect_from_pkgconfig(self):
if not buildcfg.has_pkgconfig:<EOL><INDENT>print("<STR_LIT>")<EOL>return False<EOL><DEDENT>cmd = "<STR_LIT>"<EOL>if self.static_extension:<EOL><INDENT>cmd += "<STR_LIT>"<EOL><DEDENT>line, exit_code = get_output(cmd)<EOL>if exit_code > <NUM_LIT:0> or len(line) == <NUM_LIT:0>:<EOL><INDENT>return False<EOL><DEDENT>opts = line.strip().split()<EOL>self.libraries = [opt[<NUM_LIT:2>:] for opt in opts if opt.startswith("<STR_LIT>")]<EOL>self.library_dirs = [opt[<NUM_LIT:2>:] for opt in opts if opt.startswith("<STR_LIT>")]<EOL>self.include_dirs = [opt[<NUM_LIT:2>:] for opt in opts if opt.startswith("<STR_LIT>")]<EOL>return True<EOL>
Detects the igraph include directory, library directory and the
        list of libraries to link to using ``pkg-config``.