From 3a575d13d55751c6b5f34d26a8d87a4c449ddaeb Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 6 Sep 2022 13:45:45 +0900 Subject: [PATCH] Ensure BASERUBY when cross-compiling --- configure.ac | 1 + win32/Makefile.sub | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/configure.ac b/configure.ac index 5b0aa218d9..f981d1aa70 100644 --- a/configure.ac +++ b/configure.ac @@ -76,6 +76,7 @@ AS_IF([test "$HAVE_BASERUBY" != no -a "`RUBYOPT=- $BASERUBY --disable=gems -e 'p HAVE_BASERUBY=no ]) AS_IF([test "$HAVE_BASERUBY" = no], [ + AS_IF([test "$cross_compiling" = yes], [AC_MSG_ERROR([executable host ruby is required for cross-compiling])]) BASERUBY="echo executable host ruby is required. use --with-baseruby option.; false" ]) AC_SUBST(BASERUBY) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 2910901d7e..b3d0a2f76e 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -24,6 +24,14 @@ REVISION_FORCE = PHONY !ifndef CROSS_COMPILING CROSS_COMPILING = no +!else if "$(CROSS_COMPILING)" == "yes" +! if "$(HAVE_BASERUBY)" != "yes" +! error executable host ruby is required for cross-compiling +! endif +!else +! if "$(CROSS_COMPILING)" != "no" +! error Bad CROSS_COMPILING +! endif !endif !ifndef win_srcdir win_srcdir = $(srcdir)/win32