Add --with-shared-gc build flag

This commit is contained in:
Matt Valentine-House 2024-04-02 11:28:52 +01:00
Родитель f86fb1eda2
Коммит a2ea4ec30c
2 изменённых файлов: 22 добавлений и 0 удалений

Просмотреть файл

@ -38,6 +38,7 @@ m4_include([tool/m4/ruby_replace_type.m4])dnl
m4_include([tool/m4/ruby_require_funcs.m4])dnl
m4_include([tool/m4/ruby_rm_recursive.m4])dnl
m4_include([tool/m4/ruby_setjmp_type.m4])dnl
m4_include([tool/m4/ruby_shared_gc.m4])dnl
m4_include([tool/m4/ruby_stack_grow_direction.m4])dnl
m4_include([tool/m4/ruby_thread.m4])dnl
m4_include([tool/m4/ruby_try_cflags.m4])dnl
@ -3750,6 +3751,7 @@ AS_IF([test x"$gcov" = xyes], [
])
RUBY_SETJMP_TYPE
RUBY_SHARED_GC
}
[begin]_group "installation section" && {
@ -4656,6 +4658,7 @@ config_summary "target OS" "$target_os"
config_summary "compiler" "$CC"
config_summary "with thread" "$THREAD_MODEL"
config_summary "with coroutine" "$coroutine_type"
config_summary "with shared GC" "$with_shared_gc"
config_summary "enable shared libs" "$ENABLE_SHARED"
config_summary "dynamic library ext" "$DLEXT"
config_summary "CFLAGS" "$cflags"

19
tool/m4/ruby_shared_gc.m4 Normal file
Просмотреть файл

@ -0,0 +1,19 @@
dnl -*- Autoconf -*-
AC_DEFUN([RUBY_SHARED_GC],[
AC_ARG_WITH(shared-gc,
AS_HELP_STRING([--with-shared-gc],
[Enable replacement of Ruby's GC from a shared library.]),
[with_shared_gc=$withval], [unset with_shared_gc]
)
AC_SUBST([with_shared_gc])
AC_MSG_CHECKING([if Ruby is build with shared GC support])
AS_IF([test "$with_shared_gc" = "yes"], [
AC_MSG_RESULT([yes])
AC_DEFINE([USE_SHARED_GC], [1])
], [
AC_MSG_RESULT([no])
with_shared_gc="no"
AC_DEFINE([USE_SHARED_GC], [0])
])
])dnl