3857N/AFixes from vim v7.4 configure for Ruby 1.9 and later versions--
3857N/Auses RbConfig instead of Config (deprecated in Ruby 1.9) and changes
3857N/Avim to use libruby.so.# from /usr/lib/$(MACH64) rather than libruby.so.
3857N/A
3857N/APatching configure instead of configure.in; attempts to
3857N/Arun autoreconf against the patched configure.in produced errors.
3857N/ARemove this patch once the vim upgrade to version 7.4 or later
3857N/Ais backported.
3857N/A
3857N/A--- src/auto/configure Tue Jul 10 13:28:45 2012
3857N/A+++ src/auto/configure Mon Feb 23 17:51:02 2015
3857N/A@@ -6327,42 +6327,55 @@
3857N/A if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
3857N/A { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
3857N/A $as_echo "OK" >&6; }
3857N/A+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
3857N/A+$as_echo_n "checking Ruby rbconfig... " >&6; }
3857N/A+ ruby_rbconfig="RbConfig"
3857N/A+ if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
3857N/A+ ruby_rbconfig="Config"
3857N/A+ fi
3857N/A+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
3857N/A+$as_echo "$ruby_rbconfig" >&6; }
3857N/A { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
3857N/A $as_echo_n "checking Ruby header files... " >&6; }
3857N/A- rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["rubyhdrdir"] || Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null`
3857N/A+ rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e "print $ruby_rbconfig::CONFIG['rubyhdrdir'] || $ruby_rbconfig::CONFIG['archdir'] || \\$hdrdir" 2>/dev/null`
3857N/A if test "X$rubyhdrdir" != "X"; then
3857N/A { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
3857N/A $as_echo "$rubyhdrdir" >&6; }
3857N/A RUBY_CFLAGS="-I$rubyhdrdir"
3857N/A- rubyarch=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["arch"]'`
3857N/A+ rubyarch=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['arch']"`
3857N/A if test -d "$rubyhdrdir/$rubyarch"; then
3857N/A RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch"
3857N/A fi
3857N/A- rubyversion=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["ruby_version"].gsub(/\./, "")[0,2]'`
3857N/A+ rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
3857N/A+ if test "X$rubyversion" = "X"; then
3857N/A+ rubyversion=`$vi_cv_path_ruby -e "print ((VERSION rescue RUBY_VERSION)).gsub(/\./, '')[0,2]"`
3857N/A+ fi
3857N/A RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
3857N/A- rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'`
3857N/A+ rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
3857N/A if test "X$rubylibs" != "X"; then
3857N/A RUBY_LIBS="$rubylibs"
3857N/A fi
3857N/A- librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'`
3857N/A- librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBY_A"])'`
3857N/A- rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'`
3857N/A+ librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
3857N/A+ librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
3857N/A+ rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
3857N/A if test -f "$rubylibdir/$librubya"; then
3857N/A librubyarg="$librubyarg"
3857N/A- RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
3857N/A- elif test "$librubyarg" = "libruby.a"; then
3857N/A- librubyarg="-lruby"
3857N/A- RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
3857N/A+ RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
3857N/A+ elif test "$librubyarg" = "libruby.a"; then
3857N/A+ librubyarg="-lruby"
3857N/A+ RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
3857N/A fi
3857N/A
3857N/A if test "X$librubyarg" != "X"; then
3857N/A RUBY_LIBS="$librubyarg $RUBY_LIBS"
3857N/A fi
3857N/A- rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'`
3857N/A+ rubyldflags=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LDFLAGS']"`
3857N/A if test "X$rubyldflags" != "X"; then
3857N/A rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
3857N/A if test "X$rubyldflags" != "X"; then
3857N/A- LDFLAGS="$rubyldflags $LDFLAGS"
3857N/A+ if test "X`echo \"$LDFLAGS\" | grep -F -e \"$rubyldflags\"`" = "X"; then
3857N/A+ LDFLAGS="$rubyldflags $LDFLAGS"
3857N/A+ fi
3857N/A fi
3857N/A fi
3857N/A RUBY_SRC="if_ruby.c"
3857N/A@@ -6371,7 +6384,7 @@
3857N/A $as_echo "#define FEAT_RUBY 1" >>confdefs.h
3857N/A
3857N/A if test "$enable_rubyinterp" = "dynamic"; then
3857N/A- libruby=`$vi_cv_path_ruby -r rbconfig -e 'printf "lib%s.%s\n", Config::CONFIG["RUBY_SO_NAME"], Config::CONFIG["DLEXT"]'`
3857N/A+ libruby=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
3857N/A $as_echo "#define DYNAMIC_RUBY 1" >>confdefs.h
3857N/A
3857N/A RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"