Skip to content

Commit a6ecd62

Browse files
committed
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)
1 parent 7a27ffc commit a6ecd62

File tree

3 files changed

+23
-27
lines changed

3 files changed

+23
-27
lines changed

src/auto/configure

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6218,16 +6218,16 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
62186218
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5
62196219
$as_echo_n "checking --with-ruby-command argument... " >&6; }
62206220

6221+
62216222
# Check whether --with-ruby-command was given.
62226223
if test "${with_ruby_command+set}" = set; then :
6223-
withval=$with_ruby_command; RUBY_CMD="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5
6224+
withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5
62246225
$as_echo "$RUBY_CMD" >&6; }
62256226
else
62266227
RUBY_CMD="ruby"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5
62276228
$as_echo "defaulting to $RUBY_CMD" >&6; }
62286229
fi
62296230

6230-
62316231
# Extract the first word of "$RUBY_CMD", so it can be a program name with args.
62326232
set dummy $RUBY_CMD; ac_word=$2
62336233
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -6292,17 +6292,14 @@ $as_echo "$rubyhdrdir" >&6; }
62926292
RUBY_LIBS="$rubylibs"
62936293
fi
62946294
librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'`
6295-
if test -f "$rubyhdrdir/$librubyarg"; then
6296-
librubyarg="$rubyhdrdir/$librubyarg"
6297-
else
6298-
rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'`
6299-
if test -f "$rubylibdir/$librubyarg"; then
6300-
librubyarg="$rubylibdir/$librubyarg"
6301-
elif test "$librubyarg" = "libruby.a"; then
6302-
librubyarg="-lruby"
6303-
else
6304-
librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"`
6305-
fi
6295+
librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBY_A"])'`
6296+
rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'`
6297+
if test -f "$rubylibdir/$librubya"; then
6298+
librubyarg="$librubyarg"
6299+
RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
6300+
elif test "$librubyarg" = "libruby.a"; then
6301+
librubyarg="-lruby"
6302+
RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
63066303
fi
63076304

63086305
if test "X$librubyarg" != "X"; then

src/configure.in

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,10 +1387,10 @@ AC_ARG_ENABLE(rubyinterp,
13871387
AC_MSG_RESULT($enable_rubyinterp)
13881388
if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
13891389
AC_MSG_CHECKING(--with-ruby-command argument)
1390+
AC_SUBST(vi_cv_path_ruby)
13901391
AC_ARG_WITH(ruby-command, [ --with-ruby-command=RUBY name of the Ruby command (default: ruby)],
1391-
RUBY_CMD="$withval"; AC_MSG_RESULT($RUBY_CMD),
1392+
RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; AC_MSG_RESULT($RUBY_CMD),
13921393
RUBY_CMD="ruby"; AC_MSG_RESULT(defaulting to $RUBY_CMD))
1393-
AC_SUBST(vi_cv_path_ruby)
13941394
AC_PATH_PROG(vi_cv_path_ruby, $RUBY_CMD)
13951395
if test "X$vi_cv_path_ruby" != "X"; then
13961396
AC_MSG_CHECKING(Ruby version)
@@ -1412,18 +1412,15 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
14121412
RUBY_LIBS="$rubylibs"
14131413
fi
14141414
librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'`
1415-
if test -f "$rubyhdrdir/$librubyarg"; then
1416-
librubyarg="$rubyhdrdir/$librubyarg"
1417-
else
1418-
rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'`
1419-
if test -f "$rubylibdir/$librubyarg"; then
1420-
librubyarg="$rubylibdir/$librubyarg"
1421-
elif test "$librubyarg" = "libruby.a"; then
1422-
dnl required on Mac OS 10.3 where libruby.a doesn't exist
1423-
librubyarg="-lruby"
1424-
else
1425-
librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"`
1426-
fi
1415+
librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBY_A"]])'`
1416+
rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'`
1417+
if test -f "$rubylibdir/$librubya"; then
1418+
librubyarg="$librubyarg"
1419+
RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
1420+
elif test "$librubyarg" = "libruby.a"; then
1421+
dnl required on Mac OS 10.3 where libruby.a doesn't exist
1422+
librubyarg="-lruby"
1423+
RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
14271424
fi
14281425

14291426
if test "X$librubyarg" != "X"; then

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,8 @@ static char *(features[]) =
714714

715715
static int included_patches[] =
716716
{ /* Add new patch number below this line */
717+
/**/
718+
176,
717719
/**/
718720
175,
719721
/**/

0 commit comments

Comments
 (0)