diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-05-13 16:13:31 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-05-13 16:13:31 +0000 |
commit | 6d53b692ab91c8817736cdec78b388e6e4990806 (patch) | |
tree | 3a84f886c14e2a9a8fe65c664b4f4805e2cbc2d4 /ext/tcltklib | |
parent | 9da4f78db46764be6dae5e7e83ff48cbecb3fb23 (diff) | |
download | ruby-6d53b692ab91c8817736cdec78b388e6e4990806.tar.gz |
support mingw32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tcltklib')
-rw-r--r-- | ext/tcltklib/extconf.rb | 12 | ||||
-rw-r--r-- | ext/tcltklib/tcltklib.c | 4 |
2 files changed, 9 insertions, 7 deletions
diff --git a/ext/tcltklib/extconf.rb b/ext/tcltklib/extconf.rb index 713cc811e5..70a765a0b9 100644 --- a/ext/tcltklib/extconf.rb +++ b/ext/tcltklib/extconf.rb @@ -2,10 +2,12 @@ require 'mkmf' -have_library("nsl", "t_open") -have_library("socket", "socket") -have_library("dl", "dlopen") -have_library("m", "log") +if RUBY_PLATFORM !~ /mswin32|mingw/ + have_library("nsl", "t_open") + have_library("socket", "socket") + have_library("dl", "dlopen") + have_library("m", "log") +end dir_config("tk") dir_config("tcl") @@ -41,7 +43,7 @@ def find_tk(tklib) end if have_header("tcl.h") && have_header("tk.h") && - (/mswin32/ =~ RUBY_PLATFORM || find_library("X11", "XOpenDisplay", + (/mswin32|mingw|cygwin/ =~ RUBY_PLATFORM || find_library("X11", "XOpenDisplay", "/usr/X11/lib", "/usr/X11R6/lib", "/usr/openwin/lib")) && find_tcl(tcllib) && find_tk(tklib) diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c index e846e1f038..93f7745f28 100644 --- a/ext/tcltklib/tcltklib.c +++ b/ext/tcltklib/tcltklib.c @@ -34,6 +34,7 @@ static VALUE ip_invoke_real _((int, VALUE*, VALUE)); /* from tkAppInit.c */ +#if !defined __MINGW32__ /* * The following variable is a special hack that is needed in order for * Sun shared libraries to be used for Tcl. @@ -41,6 +42,7 @@ static VALUE ip_invoke_real _((int, VALUE*, VALUE)); extern int matherr(); int *tclDummyMathPtr = (int *) matherr; +#endif /*---- module TclTkLib ----*/ @@ -487,8 +489,6 @@ _macinit() void Init_tcltklib() { - extern VALUE rb_argv0; /* the argv[0] */ - VALUE lib = rb_define_module("TclTkLib"); VALUE ip = rb_define_class("TclTkIp", rb_cObject); |