diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-08-30 05:25:45 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-08-30 05:25:45 +0000 |
commit | c0b8c22ebe95264db794b3e277f1ec29091a3754 (patch) | |
tree | 7beaa911a9ed6f64957c35d2c61fc27d88f4bac9 | |
parent | 4970f292fa03d956cece9aa599d444d5a30ad19a (diff) |
eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | ext/tcltklib/MANIFEST | 1 | ||||
-rw-r--r-- | ext/tcltklib/depend | 1 | ||||
-rw-r--r-- | ext/tcltklib/extconf.rb | 16 | ||||
-rw-r--r-- | ext/tcltklib/tcltklib.c | 9 | ||||
-rw-r--r-- | version.h | 4 |
6 files changed, 31 insertions, 10 deletions
@@ -1,3 +1,13 @@ +Wed Aug 30 14:23:48 2000 WATANABE Hirofumi <eban@os.rim.or.jp> + + * ext/tcltklib/tcltklib.c: support --enable-tcltk_stubs + + * ext/tcltklib/extconf.rb: ditto. + + * ext/tcltklib/stubs.c: created. examine candidate shared libraries. + + * ext/tcltklib/depend: add stubs.o. + Wed Aug 30 11:31:47 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp> * ext/Win32API/Win32API.c (Win32API_initialize): add the diff --git a/ext/tcltklib/MANIFEST b/ext/tcltklib/MANIFEST index b5e88278e0..4e37fb900f 100644 --- a/ext/tcltklib/MANIFEST +++ b/ext/tcltklib/MANIFEST @@ -2,6 +2,7 @@ MANIFEST README.euc MANUAL.euc tcltklib.c +stubs.c depend extconf.rb lib/tcltk.rb diff --git a/ext/tcltklib/depend b/ext/tcltklib/depend index e91f9dacbf..2cd9c400f7 100644 --- a/ext/tcltklib/depend +++ b/ext/tcltklib/depend @@ -1 +1,2 @@ tcltklib.o: tcltklib.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h +stubs.o: stubs.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h diff --git a/ext/tcltklib/extconf.rb b/ext/tcltklib/extconf.rb index 5f56d42a52..acc75b8cbc 100644 --- a/ext/tcltklib/extconf.rb +++ b/ext/tcltklib/extconf.rb @@ -2,7 +2,7 @@ require 'mkmf' -if RUBY_PLATFORM !~ /mswin32|mingw/ +if RUBY_PLATFORM !~ /mswin32|mingw|cygwin/ have_library("nsl", "t_open") have_library("socket", "socket") have_library("dl", "dlopen") @@ -15,10 +15,11 @@ dir_config("X11") tklib = with_config("tklib") tcllib = with_config("tcllib") +stubs = enable_config("tcltk_stubs") || with_config("tcltk_stubs") -def find_tcl(tcllib) +def find_tcl(tcllib, stubs) paths = ["/usr/local/lib", "/usr/pkg"] - func = "Tcl_FindExecutable" + func = stubs ? "Tcl_InitStubs" : "Tcl_FindExecutable" if tcllib find_library(tcllib, func, *paths) else @@ -30,9 +31,9 @@ def find_tcl(tcllib) end end -def find_tk(tklib) +def find_tk(tklib, stubs) paths = ["/usr/local/lib", "/usr/pkg"] - func = "Tk_Init" + func = stubs ? "Tk_InitStubs" : "Tk_Init" if tklib find_library(tklib, func, *paths) else @@ -47,7 +48,8 @@ end if have_header("tcl.h") && have_header("tk.h") && (/mswin32|mingw|cygwin/ =~ RUBY_PLATFORM || find_library("X11", "XOpenDisplay", "/usr/X11/lib", "/usr/X11R6/lib", "/usr/openwin/lib")) && - find_tcl(tcllib) && - find_tk(tklib) + find_tcl(tcllib, stubs) && + find_tk(tklib, stubs) + $CFLAGS += ' -DUSE_TCL_STUBS -DUSE_TK_STUBS' if stubs create_makefile("tcltklib") end diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c index 4347e9012d..7fbbe9ee12 100644 --- a/ext/tcltklib/tcltklib.c +++ b/ext/tcltklib/tcltklib.c @@ -495,7 +495,14 @@ Init_tcltklib() VALUE lib = rb_define_module("TclTkLib"); VALUE ip = rb_define_class("TclTkIp", rb_cObject); - eTkCallbackBreak = rb_define_class("TkCallbackBreak", rb_eStandardError); +#if defined USE_TCL_STUBS && defined USE_TK_STUBS + extern int ruby_tcltk_stubs(); + int ret = ruby_tcltk_stubs(); + if (ret) + rb_raise(rb_eLoadError, "tcltklib: tcltk_stubs init error(%d)", ret); +#endif + + eTkCallbackBreak = rb_define_class("TkCallbackBreak", rb_eStandardError); eTkCallbackContinue = rb_define_class("TkCallbackContinue",rb_eStandardError); rb_define_module_function(lib, "mainloop", lib_mainloop, 0); @@ -1,4 +1,4 @@ #define RUBY_VERSION "1.4.6" -#define RUBY_RELEASE_DATE "2000-08-24" +#define RUBY_RELEASE_DATE "2000-08-30" #define RUBY_VERSION_CODE 146 -#define RUBY_RELEASE_CODE 20000824 +#define RUBY_RELEASE_CODE 20000830 |