File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed
Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -83,9 +83,17 @@ AC_ARG_WITH(baseruby,
8383 ] ,
8484 [
8585 AC_PATH_PROG ( [ BASERUBY] , [ ruby] , [ false] )
86+ HAVE_BASERUBY=
8687 ] )
87- AS_IF ( [ test "$HAVE_BASERUBY" != no] , [
88- RUBYOPT=- $BASERUBY --disable=gems "${tooldir}/missing-baseruby.bat" --verbose || HAVE_BASERUBY=no
88+ AS_IF ( [ test "$HAVE_BASERUBY" = no] , [
89+ # --without-baseruby
90+ ] , [ error=`RUBYOPT=- $BASERUBY --disable=gems "${tooldir}/missing-baseruby.bat" --verbose 2>&1`] , [
91+ HAVE_BASERUBY=yes
92+ ] , [ test "$HAVE_BASERUBY" = ""] , [ # no --with-baseruby option
93+ AC_MSG_WARN ( $error ) # just warn and continue
94+ HAVE_BASERUBY=no
95+ ] , [ # the ruby given by --with-baseruby is too old
96+ AC_MSG_ERROR ( $error ) # bail out
8997] )
9098AS_IF ( [ test "${HAVE_BASERUBY:=no}" != no] , [
9199 AS_CASE ( [ "$build_os"] , [ mingw*] , [
Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ goto :loop ;
208208 shift
209209goto :loop ;
210210:baseruby
211- echo>> %config_make% HAVE_BASERUBY =
211+ echo>> %config_make% HAVE_BASERUBY = yes
212212 echo>> %config_make% BASERUBY = %~2
213213 echo>> %confargs% %1 =%2 \
214214 shift
Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ MAKEFILE = Makefile
2424CPU = PROCESSOR_LEVEL
2525CC = $(CC ) -nologo -source-charset:utf-8
2626CPP = $(CC ) -EP
27+ !if "$(HAVE_BASERUBY)" != "no" && "$(BASERUBY)" == ""
28+ BASERUBY = ruby
29+ !endif
2730
2831all : -prologue- -generic- -epilogue-
2932i386-mswin32 : -prologue- -i386- -epilogue-
@@ -46,8 +49,8 @@ prefix = $(prefix:\=/)
4649<<
4750 @type $(config_make) >>$(MAKEFILE)
4851 @del $(config_make) > nul
49- !if "$(HAVE_BASERUBY)" != "no" && "$(BASERUBY)" != ""
50- $(BASERUBY:/=\) "$(srcdir)/tool/missing-baseruby.bat" --verbose
52+ !if "$(HAVE_BASERUBY)" != "no"
53+ @ $(BASERUBY:/=\) "$(srcdir)/tool/missing-baseruby.bat" --verbose $(HAVE_BASERUBY:yes=|| exit )|| exit 0
5154!endif
5255!if "$(WITH_GMP)" != "no"
5356 @($(CC) $(XINCFLAGS) <<conftest.c -link $(XLDFLAGS) gmp.lib > nul && (echo USE_GMP = yes) || exit /b 0) >>$(MAKEFILE)
You can’t perform that action at this time.
0 commit comments