summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2024-04-02 11:28:52 +0100
committerMatt Valentine-House <matt@eightbitraptor.com>2024-04-15 19:50:47 +0100
commita2ea4ec30c409ebe8ae7952f092e0bd8c1912a17 (patch)
tree675f99efd64a92e6cd8ac1ae6f1b00a138550d43 /tool
parentf86fb1eda23ee3d59dc59452d0d7078002845d12 (diff)
Add --with-shared-gc build flag
Diffstat (limited to 'tool')
-rw-r--r--tool/m4/ruby_shared_gc.m419
1 files changed, 19 insertions, 0 deletions
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