* ext/tk/lib/tcltklib : bug fix

* ext/tk/lib/tk : bug fix and add Tcl/Tk extension support libraries


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagai 2004-07-01 09:38:48 +00:00
parent 73cf1d02ba
commit ffcedd7950
199 changed files with 14221 additions and 677 deletions

View file

@ -5,6 +5,12 @@ require 'mkmf'
is_win32 = (/mswin32|mingw|cygwin|bccwin32/ =~ RUBY_PLATFORM)
is_macosx = (/darwin/ =~ RUBY_PLATFORM)
mac_need_framework =
is_macosx &&
enable_config("mac-tcltk-framework", false) &&
FileTest.directory?("/Library/Frameworks/Tcl.framework/") &&
FileTest.directory?("/Library/Frameworks/Tk.framework/")
unless is_win32
have_library("nsl", "t_open")
have_library("socket", "socket")
@ -210,7 +216,7 @@ EOF
end
end
if is_macosx ||
if mac_need_framework ||
(have_header("tcl.h") && have_header("tk.h") &&
(is_win32 || find_library("X11", "XOpenDisplay",
"/usr/X11/lib", "/usr/lib/X11", "/usr/X11R6/lib", "/usr/openwin/lib")) &&
@ -219,7 +225,7 @@ if is_macosx ||
$CPPFLAGS += ' -DUSE_TCL_STUBS -DUSE_TK_STUBS' if stubs
$CPPFLAGS += ' -D_WIN32' if /cygwin/ =~ RUBY_PLATFORM
if is_macosx
if mac_need_framework
$CPPFLAGS += ' -I/Library/Frameworks/Tcl.framework/headers -I/Library/Frameworks/Tk.framework/Headers'
$LDFLAGS += ' -framework Tk -framework Tcl'
end