summaryrefslogtreecommitdiff
path: root/ext/tk/tkutil/extconf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/tkutil/extconf.rb')
-rw-r--r--ext/tk/tkutil/extconf.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/tk/tkutil/extconf.rb b/ext/tk/tkutil/extconf.rb
index e3aa00a4b2..dd00d5d535 100644
--- a/ext/tk/tkutil/extconf.rb
+++ b/ext/tk/tkutil/extconf.rb
@@ -1,4 +1,11 @@
-if compiled?('tk')
+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'
create_makefile('tkutil')
end