$OpenBSD: patch-rubynative_configure,v 1.4 2015/01/08 18:59:03 jeremy Exp $

Use RbConfig instead of Config, as RbConfig no longer exists
in ruby 2.2.

Use the current ruby version to figure out prefix and sitelibdir.

--- rubynative/configure.orig	Mon Dec 24 17:53:40 2007
+++ rubynative/configure	Mon Dec  1 15:57:38 2014
@@ -1228,8 +1228,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 # Export variables
-RUBY="ruby"
-RDOC="rdoc"
 MYRBLIBDIR=/usr/local/lib/ruby/site_ruby
 MYRUNPATH=""
 
@@ -1258,7 +1256,7 @@ fi
 # Setting the default prefix
 if test "$prefix" = NONE
 then
-  prefix=`ruby -rrbconfig -e 'puts(Config::CONFIG.fetch("prefix"))'`
+  prefix=`$RUBY -rrbconfig -e 'puts(RbConfig::CONFIG.fetch("prefix"))'`
 fi
 
 
@@ -1268,24 +1266,8 @@ fi
 #================================================================
 
 
-# Ruby interpreter
-printf 'checking RUBY... '
-if which ruby > /dev/null
-then
-  RUBY=`which ruby`
-fi
-printf '%s\n' "$RUBY"
-
-# Other building tools
-printf 'checking RDOC... '
-if which rdoc > /dev/null
-then
-  RDOC=`which rdoc`
-fi
-printf '%s\n' "$RDOC"
-
 # Librarh path
-myrblibdir=`ruby -rrbconfig -e 'puts(Config::CONFIG.fetch("sitelibdir"))'`
+myrblibdir=`$RUBY -rrbconfig -e 'puts(RbConfig::CONFIG.fetch("sitearchdir"))'`
 if test -n "$myrblibdir"
 then
   MYRBLIBDIR="$myrblibdir"
