|
1 Fixes from vim v7.4 configure for Ruby 1.9 and later versions-- |
|
2 uses RbConfig instead of Config (deprecated in Ruby 1.9) and changes |
|
3 vim to use libruby.so.# from /usr/lib/$(MACH64) rather than libruby.so. |
|
4 |
|
5 Patching configure instead of configure.in; attempts to |
|
6 run autoreconf against the patched configure.in produced errors. |
|
7 Remove this patch once the vim upgrade to version 7.4 or later |
|
8 is backported. |
|
9 |
|
10 --- src/auto/configure Tue Jul 10 13:28:45 2012 |
|
11 +++ src/auto/configure Mon Feb 23 17:51:02 2015 |
|
12 @@ -6327,42 +6327,55 @@ |
|
13 if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then |
|
14 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 |
|
15 $as_echo "OK" >&6; } |
|
16 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5 |
|
17 +$as_echo_n "checking Ruby rbconfig... " >&6; } |
|
18 + ruby_rbconfig="RbConfig" |
|
19 + if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then |
|
20 + ruby_rbconfig="Config" |
|
21 + fi |
|
22 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5 |
|
23 +$as_echo "$ruby_rbconfig" >&6; } |
|
24 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5 |
|
25 $as_echo_n "checking Ruby header files... " >&6; } |
|
26 - rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["rubyhdrdir"] || Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null` |
|
27 + rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e "print $ruby_rbconfig::CONFIG['rubyhdrdir'] || $ruby_rbconfig::CONFIG['archdir'] || \\$hdrdir" 2>/dev/null` |
|
28 if test "X$rubyhdrdir" != "X"; then |
|
29 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5 |
|
30 $as_echo "$rubyhdrdir" >&6; } |
|
31 RUBY_CFLAGS="-I$rubyhdrdir" |
|
32 - rubyarch=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["arch"]'` |
|
33 + rubyarch=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['arch']"` |
|
34 if test -d "$rubyhdrdir/$rubyarch"; then |
|
35 RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch" |
|
36 fi |
|
37 - rubyversion=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["ruby_version"].gsub(/\./, "")[0,2]'` |
|
38 + rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"` |
|
39 + if test "X$rubyversion" = "X"; then |
|
40 + rubyversion=`$vi_cv_path_ruby -e "print ((VERSION rescue RUBY_VERSION)).gsub(/\./, '')[0,2]"` |
|
41 + fi |
|
42 RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion" |
|
43 - rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'` |
|
44 + rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"` |
|
45 if test "X$rubylibs" != "X"; then |
|
46 RUBY_LIBS="$rubylibs" |
|
47 fi |
|
48 - librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'` |
|
49 - librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBY_A"])'` |
|
50 - rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'` |
|
51 + librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"` |
|
52 + librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"` |
|
53 + rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"` |
|
54 if test -f "$rubylibdir/$librubya"; then |
|
55 librubyarg="$librubyarg" |
|
56 - RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" |
|
57 - elif test "$librubyarg" = "libruby.a"; then |
|
58 - librubyarg="-lruby" |
|
59 - RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" |
|
60 + RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" |
|
61 + elif test "$librubyarg" = "libruby.a"; then |
|
62 + librubyarg="-lruby" |
|
63 + RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" |
|
64 fi |
|
65 |
|
66 if test "X$librubyarg" != "X"; then |
|
67 RUBY_LIBS="$librubyarg $RUBY_LIBS" |
|
68 fi |
|
69 - rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'` |
|
70 + rubyldflags=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LDFLAGS']"` |
|
71 if test "X$rubyldflags" != "X"; then |
|
72 rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'` |
|
73 if test "X$rubyldflags" != "X"; then |
|
74 - LDFLAGS="$rubyldflags $LDFLAGS" |
|
75 + if test "X`echo \"$LDFLAGS\" | grep -F -e \"$rubyldflags\"`" = "X"; then |
|
76 + LDFLAGS="$rubyldflags $LDFLAGS" |
|
77 + fi |
|
78 fi |
|
79 fi |
|
80 RUBY_SRC="if_ruby.c" |
|
81 @@ -6371,7 +6384,7 @@ |
|
82 $as_echo "#define FEAT_RUBY 1" >>confdefs.h |
|
83 |
|
84 if test "$enable_rubyinterp" = "dynamic"; then |
|
85 - libruby=`$vi_cv_path_ruby -r rbconfig -e 'printf "lib%s.%s\n", Config::CONFIG["RUBY_SO_NAME"], Config::CONFIG["DLEXT"]'` |
|
86 + libruby=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"` |
|
87 $as_echo "#define DYNAMIC_RUBY 1" >>confdefs.h |
|
88 |
|
89 RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS" |