
module Config

  unless self.respond_to?(:datadir)

    # Return the path to the data directory associated with the
    # given library/package name. Normally this is just
    #
    #   "#{Config::CONFIG['datadir']}/#{name}"
    #
    # but may be modified by tools like RubyGems to handle
    # versioned data directories.

    def self.datadir(package_name)
      File.join(CONFIG['datadir'], package_name)
    end

  end

end
