From: buck@...9000.localdomain (Buck Pyland) Date: 2001-08-25T11:32:48+09:00 Subject: [ruby-talk:20344] Re: Compiling Ruby with cygwin and Tk support In article <20010816154049.A26853@acc.umu.se>, Niklas Frykholm wrote: > On Thu, Aug 16, 2001 at 07:14:06PM +0900, Manuel Zabelt wrote: >> $ ruby extconf.rb >> checking for tcl.h... yes >> checking for tk.h... no >> >> The tcl.h and tk.h file both rest in /usr/include. >> Why the heck is tcl.h found and tk.h isn't? > > Ruby does not only check for existence of the file, it checks that it is > OK to include the file in a program. The problem is that includes > X11-header files which are not normally distributed in a cygwin environment. > You need to get the missing X11-header files, for example by downloading > xfree86 for cygwin (a link was posted here a couple of days ago) and > put them in the right directories. > > I, for one, think that ruby should be more clear about this (an error or > warning should be printed when compiling). As it is now, most users who > try to compile under cygwin will get no warning or error message, but Tk > will simply not work. Finding out why requires a somewhat time-consuming > investigation. > > // Niklas > > This is correct. /usr/include/tk.h includes which only exists if you have X11R6 installed. Getting past this, however, I had to modify the generated Makefiles in both ext/tcltklib and ext/tk to add the /usr/X11R6/include and /usr/X11R6/lib to CPPFLAGS and LDFLAGS variables, respectively. I recalled something about the --with-(tcl|tk)-(includes|libraries) options in a newsgroup or webpage before, but these were not documented in the configure script. I guess I did it the hard way, but it worked. :) -- Buck Pyland buckpyland@home.com