FEAT: add detection functions to machotools.