HOW TO COMPILE THE TKHTML WIDGET
The TkHtml widget is written in C code. But many of the C source code
files are automatically generated. This makes the compilation more
complex that many people are used to.
The source code is contained in the directory where this file was found
and its subdirectories. You should not compile in the source code directory.
Instead, compile in a parallel directory. Like this:
All the build products will be placed in the "bld" directory which is a
sibling directory of the source code directory.
You will need a working installation of Tcl/Tk in order to compile. If
you installation is not complex, and you are not trying to do anything
clever like cross-compile, then you should be able to compile as follows:
This above assumes that the name of the top-level directory containing
source code is "htmlwidget" and that you are building in a sibling directory
The configure script makes a valiant attempt to figure out how to compile
on your system. It is successful many times. But a lot of times you have
to give it some hints.
The most common problem that configure has is in locating appropriate
Tcl/Tk header files and libraries. If you have compiled Tcl/Tk yourself,
you can point the configure script to the directories where you compiled
Tcl/Tk and the makefile will use libraries and header files found in
those directories. Note that you do NOT have to install Tcl/Tk in order
for this to work. You merely have to compile it. Suppose I have
compiled Tcl in a directory named /home/drh/tcltk/tcl8.2 and I compiled
Tk in /home/drh/tcltk/tk8.2. Then I might type:
../htmlwidget/configure --with-tcl=/home/drh/tcltk/tcl8.2 \
If you are trying to do something really strange, like cross-compile,
you will probably need to give configure some specific hints about
the locations of compiles, linkers, libraries and so forth. You can
do this with environment variables. See the comment at the beginning
of the "configure.in" file for additional information.
Even if configure is not able to locate all the necessary libraries,
it will probably find enough information for you to type:
The "srcdir" make target generates all of the C code and header files
and makes copies of them into the subdirectory named "srcdir". Given
those source files, you should probably be able to concoct your own
build procedure that will do what you need.
The Makefile does not know how to build DLLs. There is a script for
that purpose in the source directory. (mkdll.sh). The script works
as a cross-compiler using the Cygwin/Mingw32 compiler suite on a
Linux host. It is setup for my particular machine. You will probably
need to adjust some paths to get it to work at your site.
Note that that Makefile for TkHtml is generated by a tcl script. The
configure script first collects information that will be needed and
uses this information to construct "makemake.tcl" from "makemake.tcl.in".
Once "makemake.tcl" has been constructed, it is executed to generate