diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-11-22 07:06:11 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-11-22 07:06:11 +0000 |
commit | 8faf08a4e17b3b7d3621b429688bab9775fbf335 (patch) | |
tree | 68417eab581340514628e52fab6bf55cc103b07f /ext/tk/extconf.rb | |
parent | 57b5bf86a9359079bb841596c369d04ef05e1a1b (diff) |
* ext/tk/extconf.rb: support --with-X11/--without-X11 option.
* ext/tk/README.tcltklib: add description about --with-X11-* option
[ruby-talk:225166] and --with-X11/--without-X11 option.
* ext/tk/tkutil/extconf.rb: able to be called manually [ruby-talk:225950].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/extconf.rb')
-rw-r--r-- | ext/tk/extconf.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb index 8c8d833481..5ed86a8b76 100644 --- a/ext/tk/extconf.rb +++ b/ext/tk/extconf.rb @@ -47,6 +47,8 @@ tklib = with_config("tklib") tcllib = with_config("tcllib") stubs = enable_config("tcltk_stubs") || with_config("tcltk_stubs") +use_X = with_config("X11", (! is_win32)) + def find_tcl(tcllib, stubs) paths = ["/usr/local/lib", "/usr/pkg/lib", "/usr/lib"] if stubs @@ -273,8 +275,9 @@ end if tcltk_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")) && + ( !use_X || find_library("X11", "XOpenDisplay", + "/usr/X11/lib", "/usr/lib/X11", + "/usr/X11R6/lib", "/usr/openwin/lib")) && find_tcl(tcllib, stubs) && find_tk(tklib, stubs)) $CPPFLAGS += ' -DUSE_TCL_STUBS -DUSE_TK_STUBS' if stubs |