Skip to content

Commit

Permalink
eban
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
eban committed Aug 30, 2000
1 parent 4970f29 commit c0b8c22
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 10 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
@@ -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
Expand Down
1 change: 1 addition & 0 deletions ext/tcltklib/MANIFEST
Expand Up @@ -2,6 +2,7 @@ MANIFEST
README.euc
MANUAL.euc
tcltklib.c
stubs.c
depend
extconf.rb
lib/tcltk.rb
Expand Down
1 change: 1 addition & 0 deletions 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
16 changes: 9 additions & 7 deletions ext/tcltklib/extconf.rb
Expand Up @@ -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")
Expand All @@ -15,10 +15,11 @@

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
Expand All @@ -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
Expand All @@ -47,7 +48,8 @@ def find_tk(tklib)
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
9 changes: 8 additions & 1 deletion ext/tcltklib/tcltklib.c
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions version.h
@@ -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

0 comments on commit c0b8c22

Please sign in to comment.