code: def read_pal_version():
      
      verfile = os.path.join("cextern", "pal", "configure.ac")
      verstring = "-1.-1.-1"
      for line in open(verfile):
          if line.startswith("AC_INIT"):
              # Version will be in string [nn.mm.pp]
              match = re.search(r"\[(\d+\.\d+\.\d+)\]", line)
              if match:
                  verstring = match.group(1)
              break
      (major, minor, patch) = verstring.split(".")
      return (verstring, major, minor, patch)
docs: Scans the PAL configure.ac looking for the version number.
  
      (vers, maj, min, patchlevel) = read_pal_version()
  
      Returns the version as a string and the major, minor
      and patchlevel version integers