Cygwin TCL/TK compile(2005.3.6)

We use Mingw2.0.0.(Not applicable 3.0)
Download from Mingw Home:
MinGW-2.0.0-3.exe
Execute this self-extraced exe and then place the contents at the location:
/usr/local/mingw
Exec
export PATH=/usr/local/mingw/bin:$PATH
Extract TCL/TK(8.4.9) source (Not 8.4.7)
TCL is easy.
cd win
./configure
Then you must edit Makefile directly.
Find the line:
CYGPATH = cygpath -w
change this as
CYGPATH = cygpath -u
which means path is represented in unix form. Then
make
make install
TK
cd win
./configure
Then you must edit Makefile directly.
CYGPATH = cygpath -w
is chaged to
CYGPATH = cygpath -u
Find 5 lines:
TCL_SRC_DIR =
TCL_BINDIR =
TCL_GENERIC_DIR =
TCL_LIB_FILE =
TCL_STUB_LIB_FILE =
The right hand of these lines must be the relative path.
Change these as the following
TCL_SRC_DIR =../../tcl8.4.9
TCL_BINDIR =../../tcl8.4.9/win
TCL_GENERIC_DIR = ../../tcl8.4.9/generic
TCL_LIB_FILE = ../../tcl8.4.9/win/libtcl84.a
TCL_STUB_LIB_FILE = ../../tcl8.4.9/win/libtclstub84.a
Note that you can't use symbolic link as TCL
Then execute
make clean ;make; make install
At the end, you must close the cygwin window and restart cygwin, because mingw will fail to compile the ss!!

NOTE
Cygwin HOME supports the binary tcl/tk8.4.1
echo $tcl_patchLevel
installed usually in
/usr/bin,/usr/lib
If you need, add two lines
export TCL_LIBRARY=/usr/local/lib/tcl8.4
export TK_LIBRARY=/usr/local/lib/tk8.4
to .bashrc.
If you add c:\cygwin\usr\local\bin to the Window system environment variable PATH,
you can invoke 'ss' from DOS-window.
Have fun!