summaryrefslogtreecommitdiff
path: root/ext/tk/tkutil/extconf.rb
blob: 57de973c0aa3308555443f8068cc65a8b632c609 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
begin
  has_tk = compiled?('tk')
rescue NoMethodError
  # Probably, called manually (NOT from 'extmk.rb'). Force to make Makefile.
  has_tk = true
end

if has_tk
  require 'mkmf'

  have_func("rb_obj_instance_exec", "ruby.h")
  have_func("rb_obj_untrust", "ruby.h")
  have_func("rb_obj_taint", "ruby.h")
  have_func("rb_sym_to_s", "ruby.h")
  have_func("strndup", "string.h")

  create_makefile('tkutil')
end