aboutsummaryrefslogtreecommitdiffstats
path: root/ext/tk/extconf.rb
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-25 19:55:32 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-25 19:55:32 +0000
commit9e415266a8f373d6752f775ea4a63bf443847d08 (patch)
treef2dbc579027429a9739a8b1f3a99a8f20033a2af /ext/tk/extconf.rb
parent77891d864ffd578e7cb85f065c91ef284a4f7e46 (diff)
downloadruby-9e415266a8f373d6752f775ea4a63bf443847d08.tar.gz
* ext/tk/extconf.rb: fix [ruby-core:28901] [Bug #2997]. Thanks, Michael Graff.
* ext/tk/tcltklib.c: use xfree() for memories allocated by ALLOC(). * ext/tk/tkutil/tkutil.c: ditto. * ext/tk/lib/tkextlib/version.rb: forgot updating. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/extconf.rb')
-rw-r--r--ext/tk/extconf.rb17
1 files changed, 11 insertions, 6 deletions
diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb
index 067c51449e..1bcda597b5 100644
--- a/ext/tk/extconf.rb
+++ b/ext/tk/extconf.rb
@@ -1,6 +1,6 @@
##############################################################
# extconf.rb for tcltklib
-# release date: 2009-08-09
+# release date: 2010-03-26
##############################################################
require 'mkmf'
@@ -999,7 +999,7 @@ def find_tcltk_header(tclver, tkver)
end
if TkConfig_Info['TK_INCLUDE_SPEC'] &&
- have_tk_h = try_cpp('tk.h', TclConfig_Info['TK_INCLUDE_SPEC'])
+ have_tk_h = try_cpp('tk.h', TkConfig_Info['TK_INCLUDE_SPEC'])
$INCFLAGS << " " << TkConfig_Info['TK_INCLUDE_SPEC']
elsif have_tk_h = have_header('tk.h')
# find
@@ -1026,12 +1026,12 @@ def setup_for_macosx_framework
if File.exist?(dir = File.join(TkLib_Config["tcltk-framework"],
'Tcl.framework', 'Headers'))
TclConfig_Info['TCL_INCLUDE_SPEC'] = "-I#{dir} "
- TclConfig_Info['TK_INCLUDE_SPEC'] = "-I#{File.join(TkLib_Config['tcltk-framework'], 'Tk.framework', 'Headers')} "
+ TkConfig_Info['TK_INCLUDE_SPEC'] = "-I#{File.join(TkLib_Config['tcltk-framework'], 'Tk.framework', 'Headers')} "
else
dir = Dir.glob(File.join(TkLib_Config["tcltk-framework"],
'Tcl.framework', '*', 'Headers'))
TclConfig_Info['TCL_INCLUDE_SPEC'] = "-I#{dir[0]} " unless dir.empty?
- TclConfig_Info['TK_INCLUDE_SPEC'] = "-I#{Dir.glob(File.join(TkLib_Config['tcltk-framework'], 'Tk.framework', '*', 'Headers'))[0]} "
+ TkConfig_Info['TK_INCLUDE_SPEC'] = "-I#{Dir.glob(File.join(TkLib_Config['tcltk-framework'], 'Tk.framework', '*', 'Headers'))[0]} "
end
$LDFLAGS << ' -framework Tk -framework Tcl'
@@ -1084,6 +1084,11 @@ def search_X_libraries
puts("Can't find X11 libraries. So, can't make tcltklib.so which is required by Ruby/Tk.")
exit
end
+
+ if TkConfig_Info['TK_XINCLUDES'] &&
+ !TkConfig_Info['TK_XINCLUDES'].strip.empty?
+ $INCFLAGS << " " << TkConfig_Info['TK_XINCLUDES'].strip
+ end
end
use_X
@@ -1400,8 +1405,8 @@ if (TkLib_Config["tcltk-framework"] ||
$INSTALLFILES << ["lib/tkextlib/SUPPORT_STATUS", "$(RUBYLIBDIR)", "lib"]
# create
- $defs << %[-DRUBY_VERSION=\\"#{RUBY_VERSION}\\"]
- $defs << %[-DRUBY_RELEASE_DATE=\\"#{RUBY_RELEASE_DATE}\\"]
+ $CPPFLAGS << %[ -DRUBY_VERSION=\\"#{RUBY_VERSION}\\"]
+ $CPPFLAGS << %[ -DRUBY_RELEASE_DATE=\\"#{RUBY_RELEASE_DATE}\\"]
create_makefile("tcltklib")