diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-06-12 15:25:49 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-06-12 15:25:49 +0000 |
commit | c0271cadd7c49f2c3304e93f6190da0b8623c1f3 (patch) | |
tree | ae877225c9d33c23865c14f81a6cf6252f10e590 /ext/tcltklib/extconf.rb | |
parent | 82593c058f0a61d8d4bcf7279fed496022330246 (diff) |
* ext/tcltklib/extconf.rb: [EXPERIMENTAL] MacOS X (darwin) support
* ext/tcltklib/tcltklib.c: fix thread trouble on callback proc, and
eliminate warning about instance variable access
* ext/tk/lib/tk/menubar.rb: improve supported menu_spec
* ext/tk/lib/tk/menuspec.rb: [add] menu_spec support library
* ext/tk/lib/tk/root.rb: add menu_spec support
* ext/tk/lib/tk/text.rb: bug fix
* ext/tk/lib/tk/toplevel.rb: add menu_spec support
* ext/tk/sample/menubar?.rb: [add] sample of menu_spec usage
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tcltklib/extconf.rb')
-rw-r--r-- | ext/tcltklib/extconf.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ext/tcltklib/extconf.rb b/ext/tcltklib/extconf.rb index ac3c68e926..83b4a2ac31 100644 --- a/ext/tcltklib/extconf.rb +++ b/ext/tcltklib/extconf.rb @@ -3,6 +3,7 @@ require 'mkmf' is_win32 = (/mswin32|mingw|cygwin|bccwin32/ =~ RUBY_PLATFORM) +is_macosx = (/darwin/ =~ RUBY_PLATFORM) unless is_win32 have_library("nsl", "t_open") @@ -209,13 +210,19 @@ EOF end end -if have_header("tcl.h") && have_header("tk.h") && +if is_macosx || + (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")) && find_tcl(tcllib, stubs) && - find_tk(tklib, stubs) + find_tk(tklib, stubs)) $CPPFLAGS += ' -DUSE_TCL_STUBS -DUSE_TK_STUBS' if stubs $CPPFLAGS += ' -D_WIN32' if /cygwin/ =~ RUBY_PLATFORM + if is_macosx + $CPPFLAGS += ' -I/Library/Frameworks/Tcl.framework/headers -I/Library/Frameworks/Tk.framework/Headers' + $LDFLAGS += ' -framework Tk -framework Tcl' + end + create_makefile("tcltklib") if pthread_check end |