1
0
forked from aniani/vim

updated for version 7.3.176

Problem:    Ruby linking doesn't work properly on Mac OS X.
Solution:   Fix the configure check for Ruby. (Bjorn Winckler)
This commit is contained in:
Bram Moolenaar
2011-05-05 18:10:16 +02:00
parent 1701e4069b
commit 948733a874
3 changed files with 24 additions and 28 deletions

17
src/auto/configure vendored
View File

@@ -6218,16 +6218,16 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5
$as_echo_n "checking --with-ruby-command argument... " >&6; } $as_echo_n "checking --with-ruby-command argument... " >&6; }
# Check whether --with-ruby-command was given. # Check whether --with-ruby-command was given.
if test "${with_ruby_command+set}" = set; then : if test "${with_ruby_command+set}" = set; then :
withval=$with_ruby_command; RUBY_CMD="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5 withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5
$as_echo "$RUBY_CMD" >&6; } $as_echo "$RUBY_CMD" >&6; }
else else
RUBY_CMD="ruby"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5 RUBY_CMD="ruby"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5
$as_echo "defaulting to $RUBY_CMD" >&6; } $as_echo "defaulting to $RUBY_CMD" >&6; }
fi fi
# Extract the first word of "$RUBY_CMD", so it can be a program name with args. # Extract the first word of "$RUBY_CMD", so it can be a program name with args.
set dummy $RUBY_CMD; ac_word=$2 set dummy $RUBY_CMD; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -6292,17 +6292,14 @@ $as_echo "$rubyhdrdir" >&6; }
RUBY_LIBS="$rubylibs" RUBY_LIBS="$rubylibs"
fi fi
librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'` librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'`
if test -f "$rubyhdrdir/$librubyarg"; then librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBY_A"])'`
librubyarg="$rubyhdrdir/$librubyarg"
else
rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'` rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'`
if test -f "$rubylibdir/$librubyarg"; then if test -f "$rubylibdir/$librubya"; then
librubyarg="$rubylibdir/$librubyarg" librubyarg="$librubyarg"
RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
elif test "$librubyarg" = "libruby.a"; then elif test "$librubyarg" = "libruby.a"; then
librubyarg="-lruby" librubyarg="-lruby"
else RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
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 if test "X$librubyarg" != "X"; then

View File

@@ -1387,10 +1387,10 @@ AC_ARG_ENABLE(rubyinterp,
AC_MSG_RESULT($enable_rubyinterp) AC_MSG_RESULT($enable_rubyinterp)
if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
AC_MSG_CHECKING(--with-ruby-command argument) AC_MSG_CHECKING(--with-ruby-command argument)
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))
AC_SUBST(vi_cv_path_ruby) AC_SUBST(vi_cv_path_ruby)
AC_ARG_WITH(ruby-command, [ --with-ruby-command=RUBY name of the Ruby command (default: ruby)],
RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; AC_MSG_RESULT($RUBY_CMD),
RUBY_CMD="ruby"; AC_MSG_RESULT(defaulting to $RUBY_CMD))
AC_PATH_PROG(vi_cv_path_ruby, $RUBY_CMD) AC_PATH_PROG(vi_cv_path_ruby, $RUBY_CMD)
if test "X$vi_cv_path_ruby" != "X"; then if test "X$vi_cv_path_ruby" != "X"; then
AC_MSG_CHECKING(Ruby version) AC_MSG_CHECKING(Ruby version)
@@ -1412,18 +1412,15 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
RUBY_LIBS="$rubylibs" RUBY_LIBS="$rubylibs"
fi fi
librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'` librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'`
if test -f "$rubyhdrdir/$librubyarg"; then librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBY_A"]])'`
librubyarg="$rubyhdrdir/$librubyarg"
else
rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'` rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'`
if test -f "$rubylibdir/$librubyarg"; then if test -f "$rubylibdir/$librubya"; then
librubyarg="$rubylibdir/$librubyarg" librubyarg="$librubyarg"
RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
elif test "$librubyarg" = "libruby.a"; then elif test "$librubyarg" = "libruby.a"; then
dnl required on Mac OS 10.3 where libruby.a doesn't exist dnl required on Mac OS 10.3 where libruby.a doesn't exist
librubyarg="-lruby" librubyarg="-lruby"
else RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
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 if test "X$librubyarg" != "X"; then

View File

@@ -714,6 +714,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
176,
/**/ /**/
175, 175,
/**/ /**/