On 5/18/05, Hidetoshi NAGAI <nagai / ai.kyutech.ac.jp> wrote:
> From: Mark Hubbart <discordantus / gmail.com>
> Subject: Re: Ruby/TK on Mac OS X Tiger?
> Date: Thu, 19 May 2005 01:10:50 +0900
> Message-ID: <de63abca050518091045ad43b6 / mail.gmail.com>
> > I forgot to specify that the requirement is in the *Ruby* Tk
> > extension, not in the Tk framework itself. Tk apps run fine without
> > X11, RubyTk apps don't.
> 
> Hmmm...
> I think, when do configure with "--enable-mac-tcltk-framework"
> option, Ruby/Tk (tcltklib) doesn't need to link the X11 library.
> Am I wrong?
> Could anyone try to compile with "--enable-mac-tcltk-framework" ?

I'll try it out. I suspect Apple used it when compiling, though, since
they linked it against the framework.

configure --prefix=/foo/local --enable-mac-tcltk-framework --enable-pthread

...

configured, compiled, installed, moved the X11 library out of the way.
it fails while trying to load libx11.

Tried removing X11 and compiling the tcltklib extension. It wouldn't compile.

Here's the extconf output from a successful configuration:

mark@eMac% ruby extconf.rb 
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for dlopen() in -ldl... yes
checking for log() in -lm... no
checking for tcl.h... yes
checking for tk.h... yes
checking for XOpenDisplay() in -lX11... yes
checking for Tcl_FindExecutable() in -ltcl... yes
checking for Tk_Init() in -ltk... yes
creating Makefile

Also, since my recent Tiger (OSX 10.4) upgrade, the average c file in
the ruby source gives a good 20-30 warnings about pointers differing
in signedness. Yay, megabytes of text in my scrollback buffer. :)

HTH,
Mark