diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-07-08 23:52:41 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-07-09 13:53:20 +0900 |
commit | a0a5eec0e70aa5bd6ba170b89f6ecb2b7c16fbbd (patch) | |
tree | 3a9de1382ac3605273e7db5e9213e8bf2cbc102e /configure.ac | |
parent | 9fc25811d59422355fc3a0ed0f28155e4e47267f (diff) |
Bail out when unsupported coroutine target
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 1b14816400..dc4ab53caa 100644 --- a/configure.ac +++ b/configure.ac @@ -2386,6 +2386,7 @@ AC_ARG_WITH(coroutine, [rb_cv_coroutine=$withval]) AS_CASE([$rb_cv_coroutine], [yes|''], [ AC_MSG_CHECKING(native coroutine implementation for ${target_cpu}-${target_os}) + rb_cv_coroutine= AS_CASE(["$target_cpu-$target_os"], [x*64-darwin*], [ rb_cv_coroutine=amd64 @@ -2397,7 +2398,7 @@ AS_CASE([$rb_cv_coroutine], [yes|''], [ AS_CASE(["$ac_cv_sizeof_voidp"], [8], [ rb_cv_coroutine=amd64 ], [4], [ rb_cv_coroutine=x86 ], - [*], [ rb_cv_coroutine= ] + dnl unknown pointer size, bail out as no Context.h soon. ) ], [*86-linux*], [ @@ -2427,20 +2428,22 @@ AS_CASE([$rb_cv_coroutine], [yes|''], [ [*-openbsd*], [ rb_cv_coroutine=copy ], - [*], [ + [ rb_cv_coroutine=ucontext ] ) AC_MSG_RESULT(${rb_cv_coroutine}) ]) COROUTINE_H=coroutine/$rb_cv_coroutine/Context.h +AS_IF([test ! -f "$srcdir/$COROUTINE_H"], + [AC_MSG_ERROR('$rb_cv_coroutine' is not supported as coroutine)]) AS_CASE([$rb_cv_coroutine], [copy|ucontext], [ COROUTINE_SRC=coroutine/$rb_cv_coroutine/Context.c ], - [*], [ + [ COROUTINE_SRC=coroutine/$rb_cv_coroutine/Context.'$(ASMEXT)' - ], + ] ) AC_DEFINE_UNQUOTED(COROUTINE_H, ["$COROUTINE_H"]) AC_SUBST(X_COROUTINE_H, [$COROUTINE_H]) |