From: Andreas Stieger <andreas.stieger@gmx.de>
Date: Sat, 12 May 2012 00:20:35 +0100
Subject: [PATCH] fix Ruby 1.9 deprecation warning for Config, use RbConfig
References: http://mail-archives.apache.org/mod_mbox/subversion-dev/201205.mbox/%3C4FAD9EC3.1030207%40gmx.de%3E https://mail-archives.apache.org/mod_mbox/subversion-commits/201205.mbox/%3C20120512111900.C40DB2388860%40eris.apache.org%3E
Upstream: merged

Fixes warning/error in ruby 1.9 "Use RbConfig instead of obsolete and deprecated Config"

$ svn log -r1337514 -v https://svn.apache.org/repos/asf/subversion/trunk/
------------------------------------------------------------------------
r1337514 | astieger | 2012-05-12 12:19:00 +0100 (Sat, 12 May 2012) | 9 lines
Changed paths:
   M /subversion/trunk/build/ac-macros/swig.m4
   M /subversion/trunk/configure.ac

fix Ruby 1.9 deprecation warning for Config, use RbConfig

* configure.ac
  replace Config with RbConfig
* build/ac-macros/swig.m4
  replace Config with RbConfig

Approved by: gstein

---
 build/ac-macros/swig.m4 |    2 +-
 configure.ac            |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Index: subversion-1.7.8/build/ac-macros/swig.m4
===================================================================
--- subversion-1.7.8.orig/build/ac-macros/swig.m4	2011-06-22 15:45:03.000000000 +0100
+++ subversion-1.7.8/build/ac-macros/swig.m4	2012-12-11 13:00:18.000000000 +0000
@@ -187,7 +187,7 @@ AC_DEFUN(SVN_FIND_SWIG,
     for var_name in arch archdir CC LDSHARED DLEXT LIBS LIBRUBYARG \
                     rubyhdrdir sitedir sitelibdir sitearchdir libdir
     do
-      rbconfig_tmp=`$rbconfig "print Config::CONFIG@<:@'$var_name'@:>@"`
+      rbconfig_tmp=`$rbconfig "print RbConfig::CONFIG@<:@'$var_name'@:>@"`
       eval "rbconfig_$var_name=\"$rbconfig_tmp\""
     done
 
Index: subversion-1.7.8/configure.ac
===================================================================
--- subversion-1.7.8.orig/configure.ac	2012-10-02 18:18:00.000000000 +0100
+++ subversion-1.7.8/configure.ac	2012-12-11 13:00:18.000000000 +0000
@@ -1117,12 +1117,12 @@ if test "$RUBY" != "none"; then
       AC_PATH_PROGS(RDOC, rdoc rdoc1.8 rdoc18, none)
     fi
     AC_CACHE_CHECK([for Ruby major version], [svn_cv_ruby_major],[
-    svn_cv_ruby_major="`$RUBY -rrbconfig -e 'print Config::CONFIG.fetch(%q(MAJOR))'`"
+    svn_cv_ruby_major="`$RUBY -rrbconfig -e 'print RbConfig::CONFIG.fetch(%q(MAJOR))'`"
     ])
     RUBY_MAJOR="$svn_cv_ruby_major"
 
     AC_CACHE_CHECK([for Ruby minor version], [svn_cv_ruby_minor],[
-    svn_cv_ruby_minor="`$RUBY -rrbconfig -e 'print Config::CONFIG.fetch(%q(MINOR))'`"
+    svn_cv_ruby_minor="`$RUBY -rrbconfig -e 'print RbConfig::CONFIG.fetch(%q(MINOR))'`"
     ])
     RUBY_MINOR="$svn_cv_ruby_minor"
 
