summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-09-03 03:21:23 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-09-03 19:20:03 +0900
commit21a5da3c4c803987c48bc9ca588948c50715631a (patch)
tree7ef21bb081f629f5c4c3a0a6265c275289cb6edb /configure.ac
parentd8f81ffdff668b457339885c15d7cee785ad38be (diff)
Check if MSys shell can run a command with a drive letter
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 0f4a31af7e..2fd68c0013 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,13 +65,19 @@ AC_ARG_WITH(baseruby,
AC_PATH_PROG([BASERUBY], [ruby], [false])
])
AS_IF([test "$HAVE_BASERUBY" != no -a "`RUBYOPT=- $BASERUBY --disable=gems -e 'print 42 if RUBY_VERSION > "2.2"' 2>/dev/null`" = 42], [
+ AS_CASE(["$build_os"], [mingw*], [
+ # Can MSys shell run a command with a drive letter?
+ RUBYOPT=- `cygpath -ma "$BASERUBY"` --disable=gems -e exit 2>/dev/null || HAVE_BASERUBY=no
+ ])
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
], [
- BASERUBY="echo executable host ruby is required. use --with-baseruby option.; false"
HAVE_BASERUBY=no
])
+AS_IF([test "$HAVE_BASERUBY" = no], [
+ BASERUBY="echo executable host ruby is required. use --with-baseruby option.; false"
+])
AC_SUBST(BASERUBY)
AC_SUBST(HAVE_BASERUBY)
@@ -3364,7 +3370,7 @@ AS_IF([test x"$cross_compiling" = xyes], [
RUNRUBY_COMMAND='$(MINIRUBY) $(tooldir)/runruby.rb --extout=$(EXTOUT) $(RUNRUBYOPT)'
RUNRUBY='$(RUNRUBY_COMMAND) --'
XRUBY='$(RUNRUBY)'
- AS_CASE(["$HAVE_BASERUBY:$build_os"], [no:*|*:mingw*], [BOOTSTRAPRUBY='$(MINIRUBY)'])
+ AS_CASE(["$HAVE_BASERUBY"], [no], [BOOTSTRAPRUBY='$(MINIRUBY)'])
TEST_RUNNABLE=yes
CROSS_COMPILING=no
])