public
Last active

  • Download Gist
MacVim 1.9.1 patch.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
diff --git a/src/configure.in b/src/configure.in
index 85df7da..c812062 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -996,72 +996,75 @@ if test "$enable_rubyinterp" = "yes"; then
AC_ARG_WITH(ruby-command, [ --with-ruby-command=RUBY name of the Ruby command (default: ruby)],
RUBY_CMD="$withval"; AC_MSG_RESULT($RUBY_CMD),
RUBY_CMD="ruby"; AC_MSG_RESULT(defaulting to $RUBY_CMD))
+ if test "X$vi_cv_path_ruby" = "X"; then
+ vi_cv_path_ruby=$withval
+ fi
AC_SUBST(vi_cv_path_ruby)
AC_PATH_PROG(vi_cv_path_ruby, $RUBY_CMD)
- if test "X$vi_cv_path_ruby" != "X"; then
- AC_MSG_CHECKING(Ruby version)
- if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
- AC_MSG_RESULT(OK)
- AC_MSG_CHECKING(Ruby header files)
- rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG[["rubyhdrdir"]] || Config::CONFIG[["archdir"]] || $hdrdir' 2>/dev/null`
- if test "X$rubyhdrdir" != "X"; then
- AC_MSG_RESULT($rubyhdrdir)
- RUBY_CFLAGS="-I$rubyhdrdir"
- rubyarch=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["arch"]]'`
- if test -d "$rubyhdrdir/$rubyarch"; then
- RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch"
+ AC_MSG_CHECKING(Ruby version)
+ if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
+ AC_MSG_RESULT(OK)
+ AC_MSG_CHECKING(Ruby header files)
+ rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG[["rubyhdrdir"]] || Config::CONFIG[["archdir"]] || $hdrdir' 2>/dev/null`
+ AC_SUBST(rubyhdrdir)
+ if test "X$rubyhdrdir" != "X"; then
+ AC_MSG_RESULT($rubyhdrdir)
+ RUBY_CFLAGS="-I$rubyhdrdir"
+ rubyarch=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["arch"]]'`
+ if test -d "$rubyhdrdir/$rubyarch"; then
+ RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch"
+ fi
+ rubyversion=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["ruby_version"]].gsub(/\./, "")[[0,2]]'`
+ RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
+ rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LIBS"]]'`
+ if test "X$rubylibs" != "X"; then
+ RUBY_LIBS="$rubylibs"
+ fi
+ librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'`
+ if test -f "$rubyhdrdir/$librubyarg"; then
+ librubyarg="$rubyhdrdir/$librubyarg"
+ else
+ rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'`
+ if test $RUBY_CMD != $withval && test -d "/System/Library/Frameworks/Ruby.framework"; then
+ dnl On Mac OS X it is safer to just use the -framework flag
+ RUBY_LIBS="-framework Ruby"
+ dnl Don't include the -I flag when -framework is set
+ RUBY_CFLAGS=
+ librubyarg=
+ elif test -f "$rubylibdir/$librubyarg"; then
+ librubyarg="$rubylibdir/$librubyarg"
+ elif test "$librubyarg" = "libruby.a"; then
+ dnl required on Mac OS 10.3 where libruby.a doesn't exist
+ librubyarg="-lruby"
+ else
+ echo $librubyarg
+ librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, '') << %' -L#{Config.expand(Config::CONFIG[\"libdir\"])}'"`
fi
- rubyversion=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["ruby_version"]].gsub(/\./, "")[[0,2]]'`
- RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
- rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LIBS"]]'`
- if test "X$rubylibs" != "X"; then
- RUBY_LIBS="$rubylibs"
- fi
- librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'`
- if test -f "$rubyhdrdir/$librubyarg"; then
- librubyarg="$rubyhdrdir/$librubyarg"
- else
- rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'`
- if test -d "/System/Library/Frameworks/Ruby.framework"; then
- dnl On Mac OS X it is safer to just use the -framework flag
- RUBY_LIBS="-framework Ruby"
- dnl Don't include the -I flag when -framework is set
- RUBY_CFLAGS=
- librubyarg=
- elif test -f "$rubylibdir/$librubyarg"; then
- librubyarg="$rubylibdir/$librubyarg"
- elif test "$librubyarg" = "libruby.a"; then
- dnl required on Mac OS 10.3 where libruby.a doesn't exist
- librubyarg="-lruby"
- else
- librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"`
- fi
- fi
+ fi
- if test "X$librubyarg" != "X"; then
- RUBY_LIBS="$librubyarg $RUBY_LIBS"
- fi
- rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LDFLAGS"]]'`
- if test "x$MACOSX" = "xyes"; then
- dnl Ruby on Mac OS X 10.5 and later adds "-arch" flags but these
- dnl should only be included if requested by passing --with-archs
- dnl to configure, so strip these flags first (if present)
- rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch[[^-]]*//g'`
- fi
- if test "X$rubyldflags" != "X"; then
- LDFLAGS="$rubyldflags $LDFLAGS"
- fi
- RUBY_SRC="if_ruby.c"
- RUBY_OBJ="objects/if_ruby.o"
- RUBY_PRO="if_ruby.pro"
+ if test "X$librubyarg" != "X"; then
+ RUBY_LIBS="$librubyarg $RUBY_LIBS"
+ fi
+ rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG[["LDFLAGS"]]'`
+ if test "x$MACOSX" = "xyes"; then
+ dnl Ruby on Mac OS X 10.5 and later adds "-arch" flags but these
+ dnl should only be included if requested by passing --with-archs
+ dnl to configure, so strip these flags first (if present)
+ rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch[[^-]]*//g'`
+ fi
+ if test "X$rubyldflags" != "X"; then
+ LDFLAGS="$rubyldflags $LDFLAGS"
+ fi
+ RUBY_SRC="if_ruby.c"
+ RUBY_OBJ="objects/if_ruby.o"
+ RUBY_PRO="if_ruby.pro"
- AC_DEFINE(FEAT_RUBY)
+ AC_DEFINE(FEAT_RUBY)
else
- AC_MSG_RESULT(not found; disabling Ruby)
- fi
- else
- AC_MSG_RESULT(too old; need Ruby version 1.6.0 or later)
+ AC_MSG_RESULT(not found; disabling Ruby)
fi
+ else
+ AC_MSG_RESULT(too old; need Ruby version 1.6.0 or later)
fi
fi
AC_SUBST(RUBY_SRC)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.