diff options
Diffstat (limited to 'ext/strscan/extconf.rb')
| -rw-r--r-- | ext/strscan/extconf.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ext/strscan/extconf.rb b/ext/strscan/extconf.rb index 714fa99fae..4e8d851fdb 100644 --- a/ext/strscan/extconf.rb +++ b/ext/strscan/extconf.rb @@ -1,4 +1,14 @@ # frozen_string_literal: true require 'mkmf' -$INCFLAGS << " -I$(top_srcdir)" -create_makefile 'strscan' +if RUBY_ENGINE == 'ruby' + $INCFLAGS << " -I$(top_srcdir)" if $extmk + have_func("onig_region_memsize(NULL)") + have_func("rb_reg_onig_match", "ruby/re.h") + have_func("rb_deprecate_constant") + have_func("rb_int_parse_cstr", "ruby.h") # RUBY_VERSION >= 2.5 + have_func("rb_gc_location", "ruby.h") # RUBY_VERSION >= 2.7 + have_const("RUBY_TYPED_EMBEDDABLE", "ruby.h") # RUBY_VERSION >= 3.3 + create_makefile 'strscan' +else + File.write('Makefile', dummy_makefile("").join) +end |
