aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-21 03:26:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-21 03:26:59 +0000
commitf1ed4b713b2a6adf1cca30eaf0f7874ea4f1577a (patch)
tree167fabb88de9eac314f144e6229bc486ace1c30b /configure.ac
parent9cda5bba1b1665e00bebc85fcf8a62e27aff53bc (diff)
downloadruby-f1ed4b713b2a6adf1cca30eaf0f7874ea4f1577a.tar.gz
configure.ac: add --disable-fiber-coroutine option
* configure.ac: add --disable-fiber-coroutine option, and disable it on x86-mingw32 for now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac60
1 files changed, 29 insertions, 31 deletions
diff --git a/configure.ac b/configure.ac
index f59416a391..c214e96ba7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -963,6 +963,7 @@ main()
AS_IF([test "$target_cpu" = x64], [
ac_cv_func___builtin_setjmp=no
ac_cv_func_round=no
+ rb_cv_fiber_coroutine=no # TODO: Enable this after AppVeyor msys2 build succeeds
])
ac_cv_func_tgamma=no
rb_cv_negative_time_t=yes
@@ -2326,38 +2327,35 @@ AS_IF([test "${universal_binary-no}" = yes ], [
AC_DEFINE_UNQUOTED(STACK_GROW_DIRECTION, $dir)
])
-AC_MSG_CHECKING(native coroutine implementation for ${target_cpu}-${target_os})
-AS_CASE(["$target_cpu-$target_os"],
- [x*64-darwin*], [
- AC_MSG_RESULT(amd64)
- COROUTINE_H=coroutine/amd64/Context.h
- AC_DEFINE_UNQUOTED(FIBER_USE_COROUTINE, ["$COROUTINE_H"])
- AC_LIBOBJ([coroutine/amd64/Context])
- ],
- [x*64-linux], [
- AC_MSG_RESULT(amd64)
- COROUTINE_H=coroutine/amd64/Context.h
- AC_DEFINE_UNQUOTED(FIBER_USE_COROUTINE, ["$COROUTINE_H"])
- AC_LIBOBJ([coroutine/amd64/Context])
- ],
- [*86-linux], [
- AC_MSG_RESULT(x86)
- COROUTINE_H=coroutine/x86/Context.h
+AC_ARG_ENABLE(fiber-coroutine,
+ AS_HELP_STRING([--disable-fiber-coroutine], [disable native coroutine implementation for fiber]),
+ [rb_cv_fiber_coroutine=$enableval])
+AS_CASE(["$rb_cv_fiber_coroutine"], [yes|''], [
+ AC_MSG_CHECKING(native coroutine implementation for ${target_cpu}-${target_os})
+ AS_CASE(["$target_cpu-$target_os"],
+ [x*64-darwin*], [
+ rb_cv_fiber_coroutine=amd64
+ ],
+ [x*64-linux], [
+ rb_cv_fiber_coroutine=amd64
+ ],
+ [*86-linux], [
+ rb_cv_fiber_coroutine=x86
+ ],
+ [x64-mingw32], [
+ rb_cv_fiber_coroutine=win64
+ ],
+ [*], [
+ rb_cv_fiber_coroutine=
+ ]
+ )
+ AC_MSG_RESULT(${rb_cv_fiber_coroutine:-no})
+])
+AS_IF([test "${rb_cv_fiber_coroutine:-no}" != no], [
+ COROUTINE_H=coroutine/$rb_cv_fiber_coroutine/Context.h
AC_DEFINE_UNQUOTED(FIBER_USE_COROUTINE, ["$COROUTINE_H"])
- AC_LIBOBJ([coroutine/x86/Context])
- ],
- # TODO: Enable this after AppVeyor msys2 build succeeds
- # [x64-mingw32], [
- # AC_MSG_RESULT(win64)
- # COROUTINE_H=coroutine/win64/Context.h
- # AC_DEFINE_UNQUOTED(FIBER_USE_COROUTINE, ["$COROUTINE_H"])
- # AC_LIBOBJ([coroutine/win64/Context])
- # ],
- [*], [
- AC_MSG_RESULT(no)
- ]
-)
-AC_SUBST(X_FIBER_COROUTINE_H, [$COROUTINE_H])
+ AC_SUBST(X_FIBER_COROUTINE_H, [$COROUTINE_H])
+])
AS_IF([test x"$enable_pthread" = xyes], [
for pthread_lib in thr pthread pthreads c c_r root; do