This repository has been archived by the owner on Nov 15, 2021. It is now read-only.
forked from mark-moseley/ruby-debug
-
Notifications
You must be signed in to change notification settings - Fork 80
/
extconf.rb
39 lines (36 loc) · 1.35 KB
/
extconf.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
require "mkmf"
require "ruby_core_source"
if RUBY_VERSION < "1.9"
STDERR.print("Ruby version is too old\n")
exit(1)
end
hdrs = proc {
iseqs = %w[vm_core.h iseq.h]
begin
have_struct_member("rb_method_entry_t", "called_id", "method.h") or
have_struct_member("rb_control_frame_t", "method_id", "method.h")
end and
have_header("vm_core.h") and have_header("iseq.h") and have_header("insns.inc") and
have_header("insns_info.inc") and have_header("eval_intern.h") or break
have_type("struct iseq_line_info_entry", iseqs) or
have_type("struct iseq_insn_info_entry", iseqs) or
break
if checking_for(checking_message("if rb_iseq_compile_with_option was added an argument filepath")) do
try_compile(<<SRC)
#include <ruby.h>
#include "vm_core.h"
extern VALUE rb_iseq_new_main(NODE *node, VALUE filename, VALUE filepath);
SRC
end
$defs << '-DRB_ISEQ_COMPILE_5ARGS'
end
}
dir_config("ruby")
if !Ruby_core_source::create_makefile_with_core(hdrs, "ruby_debug")
STDERR.print("Makefile creation failed\n")
STDERR.print("*************************************************************\n\n")
STDERR.print(" NOTE: For Ruby 1.9 installation instructions, please see:\n\n")
STDERR.print(" http://wiki.github.com/mark-moseley/ruby-debug\n\n")
STDERR.print("*************************************************************\n\n")
exit(1)
end