summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac3
-rw-r--r--tool/m4/ruby_shared_gc.m419
2 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 45d32d8760..9ea0013850 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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"
diff --git a/tool/m4/ruby_shared_gc.m4 b/tool/m4/ruby_shared_gc.m4
new file mode 100644
index 0000000000..a27b9b8505
--- /dev/null
+++ b/tool/m4/ruby_shared_gc.m4
@@ -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