Skip to content

Commit

Permalink
Check that BASERUBY is at least Ruby 2.2 in configure
Browse files Browse the repository at this point in the history
BASERUBY needs to be at least Ruby 2.2 since
46acd00.

I think it's better to explicitly fail early as soon as BASERUBY
is used in this case, versus trying to debug later failures.

This modifies things to check both implicitly use of ruby in the
PATH as BASERUBY, and explicitly specified older versions of ruby
when using --with-baseruby.

Fixes [Bug #16668]
  • Loading branch information
jeremyevans committed May 28, 2020
1 parent 28ce758 commit 9a3371b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -34,7 +34,7 @@ AC_ARG_WITH(baseruby,
[
AC_PATH_PROG([BASERUBY], [ruby], [false])
])
AS_IF([test "$HAVE_BASERUBY" = yes -a "`RUBYOPT=- $BASERUBY --disable=gems -e 'print 42' 2>/dev/null`" = 42], [
AS_IF([test "$HAVE_BASERUBY" != no -a "`RUBYOPT=- $BASERUBY --disable=gems -e 'print 42 if RUBY_VERSION > "2.2"' 2>/dev/null`" = 42], [
BASERUBY="$BASERUBY --disable=gems"
BASERUBY_VERSION=`$BASERUBY -v`
$BASERUBY -C "$srcdir" tool/downloader.rb -d tool -e gnu config.guess config.sub >&AS_MESSAGE_FD
Expand Down

0 comments on commit 9a3371b

Please sign in to comment.