code: def detect_from_pkgconfig(self):
          
          if not buildcfg.has_pkgconfig:
              print("Cannot find the C core of igraph on this system using pkg-config.")
              return False
  
          cmd = "pkg-config igraph --cflags --libs"
          if self.static_extension:
              cmd += " --static"
          line, exit_code = get_output(cmd)
          if exit_code > 0 or len(line) == 0:
              return False
  
          opts = line.strip().split()
          self.libraries = [opt[2:] for opt in opts if opt.startswith("-l")]
          self.library_dirs = [opt[2:] for opt in opts if opt.startswith("-L")]
          self.include_dirs = [opt[2:] for opt in opts if opt.startswith("-I")]
          return True
docs: Detects the igraph include directory, library directory and the
          list of libraries to link to using ``pkg-config``.