/** @since 1.2 */
  public synchronized Map<String, IAutotoolsOption> getAutotoolsCfgOptions(
      IProject project, String cfgId) throws CoreException {

    // Verify project is valid Autotools project
    if (project == null || !project.hasNature(AutotoolsNewProjectNature.AUTOTOOLS_NATURE_ID)) {
      throw new CoreException(
          new Status(
              IStatus.ERROR,
              AutotoolsPlugin.PLUGIN_ID,
              ConfigureMessages.getString(INVALID_AUTOTOOLS_PROJECT)));
    }

    // Verify configuration id is valid
    ICConfigurationDescription cfgd =
        CoreModel.getDefault().getProjectDescription(project).getConfigurationById(cfgId);
    IConfiguration icfg = ManagedBuildManager.getConfigurationForDescription(cfgd);
    if (icfg == null) {
      throw new CoreException(
          new Status(
              IStatus.ERROR,
              AutotoolsPlugin.PLUGIN_ID,
              ConfigureMessages.getString(INVALID_AUTOTOOLS_CONFIG_ID)));
    }

    IAConfiguration cfg = getConfiguration(project, cfgId);
    HashMap<String, IAutotoolsOption> options = new HashMap<>();

    // Get set of configuration options and convert to set of IAutotoolOptions
    Map<String, IConfigureOption> cfgOptions = cfg.getOptions();
    IAConfiguration dummyCfg = createDefaultConfiguration(createDummyId());
    for (Iterator<Entry<String, IConfigureOption>> i = cfgOptions.entrySet().iterator();
        i.hasNext(); ) {
      Map.Entry<String, IConfigureOption> entry = i.next();
      String name = entry.getKey();
      IAutotoolsOption configOption =
          new AutotoolsOption(entry.getValue().copy((AutotoolsConfiguration) dummyCfg));
      options.put(name, configOption);
    }

    return options;
  }