From: Marcus Rueckert Date: 2007-01-24T08:19:52+09:00 Subject: [Patch] fix mkconfig.rb for autoconf 2.61a --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline hi, the patch fixes building with autoconf 2.61a. with 2.61a config.status script uses awk, so the syntax in file changed. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ruby-1.8.5_autoconf_2.61a.pach" Index: mkconfig.rb =================================================================== --- mkconfig.rb.orig 2007-01-23 23:43:58.732530729 +0100 +++ mkconfig.rb 2007-01-23 23:52:23.673870157 +0100 @@ -36,11 +36,42 @@ v_fast = [] v_others = [] vars = {} has_version = false +continued_name = nil +continued_line = nil File.foreach "config.status" do |line| next if /^#/ =~ line + val = nil + name = nil if /^s([%,])@(\w+)@\1(?:\|\#_!!_\#\|)?(.*)\1/ =~ line name = $2 val = $3.gsub(/\\(?=,)/, '') + elsif /^S\["(\w+)"\]="(.*)"/ =~ line + name = $1 + val = $2 + end + + if name && line =~ /\\$/ + continued_line = [] + continued_line << val + continued_name = name + next + end + + if continued_line + # collect the next lines for configure_args + if line =~ /^"(.+)"/ + continued_line << $1 + if line =~ /\\$/ + next + else + val = continued_line.join("") + name = continued_name + continued_line = nil + end + end + end + + if !name.nil? && !val.nil? next if /^(?:ac_.*|DEFS|configure_input)$/ =~ name next if /^\$\(ac_\w+\)$/ =~ val next if /^\$\{ac_\w+\}$/ =~ val --5mCyUwZo2JvN/JJP--