public function GenerateConfigs()
    {
        // Variables used by some template files.
        $authors = \Peg\Lib\Settings::GetAuthors();
        $contributors = \Peg\Lib\Settings::GetContributors();
        $extension = \Peg\Lib\Settings::GetExtensionName();
        $version = \Peg\Lib\Settings::GetVersion();

        // Variable to temporarily store a template file content.
        $content = "";

        // Generate sources list
        $source_files = array(
            "src/functions.cpp",
            "src/references.cpp"
        );

        foreach($this->symbols->headers as $header_name=>$header_object)
        {
            if($header_object->enabled)
            {
                $source_files[] = "src/".$this->GetSourceNamePHP($header_name);
            }
        }

        // Generate custom sources list
        $custom_sources = $this->GetCustomSources();

        if(count($custom_sources) > 0)
        {
            foreach($custom_sources as $custom_source)
            {
                if($custom_source != "." && $custom_source != "..")
                {
                    if(
                        (strpos($custom_source, ".c") !== false)
                        ||
                        (strpos($custom_source, ".cpp") !== false)
                    )
                    {
                        $source_files[] = "src/".$custom_source;
                    }
                }
            }
        }

        $source_files = implode(" \\\n        ", $source_files);

        // Generate config.m4
        ob_start();
            include($this->GetGenericTemplate("config.m4", "configs"));
            $content = ob_get_contents();
        ob_end_clean();

        $this->AddGenericFile("config.m4", $content);

        // Generate config.w32
        ob_start();
            include($this->GetGenericTemplate("config.w32", "configs"));
            $content = ob_get_contents();
        ob_end_clean();

        $this->AddGenericFile("config.w32", $content);
    }