Created
May 12, 2010 18:58
-
-
Save koudelka/398996 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/src/configure.in | |
+++ b/src/configure.in | |
@@ -993,11 +993,17 @@ AC_ARG_ENABLE(rubyinterp, | |
AC_MSG_RESULT($enable_rubyinterp) | |
if test "$enable_rubyinterp" = "yes"; then | |
AC_MSG_CHECKING(--with-ruby-command argument) | |
+ dnl If a ruby command was provided, set RUBY_CMD to the name of the binary and RUBY_PATH to its directory | |
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)) | |
+ RUBY_PATH=`echo "$withval" | sed 's/\(.*\)\/\([[[^/]]]*\)$/\1/'`; RUBY_CMD=`echo "$withval" | sed 's/.*\/\([[[^/]]]*\)$/\1/'`; AC_MSG_RESULT($RUBY_CMD), | |
+ RUBY_CMD="ruby"; AC_MSG_RESULT(defaulting to $RUBY_CMD) | |
+ ) | |
+ if test $RUBY_PATH != $RUBY_CMD; then | |
+ AC_PATH_PROG(vi_cv_path_ruby, $RUBY_CMD, "", $RUBY_PATH) | |
+ else | |
+ AC_PATH_PROG(vi_cv_path_ruby, $RUBY_CMD) | |
+ 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 | |
@@ -1022,20 +1028,24 @@ if test "$enable_rubyinterp" = "yes"; 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 | |
+ if test $RUBY_PATH != $RUBY_CMD; then | |
+ librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, '') << %' -L#{Config.expand(Config::CONFIG[\"libdir\"])}'"` | |
+ else | |
+ 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[\"lib | |
+ fi | |
+ fi | |
fi | |
if test "X$librubyarg" != "X"; then |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not sure, the Command-T plugin used it.