$Id: INSTALL,v 1.13 2002/02/28 02:27:31 joe Exp $
================================================================================
COST INSTALLATION GUIDE
For information about Cost, see
================================================================================
BEFORE YOU START
To build Cost you will need a standard (ISO/ANSI) C compiler,
or something reasonably close. 'gcc' should be fine.
You will also need the following packages:
* Tcl: Any version from 8.0 upwards ought to work.
However, this version of Cost has really only been tested
with Tcl 8.3.2.
* [N]SGMLS: SP/NSGMLS is recommended if it's available for your system.
SGMLS version 1.1.91 is more portable and is next best.
SGMLS version 1.1 will also work.
If you only want to process XML, then you don't need [N]SGMLS.
You may also want to get:
* Tk: Whichever version works with your copy of Tcl.
See below for archive sites where these packages may be obtained.
================================================================================
BUILDING COST UNDER UNIX
The usual routine:
cd src
./configure --with-tcl=/opt/tcltk/lib
;# or wherever tclConfig.sh is installed.
make package ;# build Cost as a dynamically loadable package
make ;# same as 'make package'
make -n install ;# check what 'make install' will do
make install ;# install the package
make clean ;# remove intermediate files
make spotless ;# remove intermediate files & all targets
If this works, great!
Chances are it won't work though. I don't quite have the hang
of autoconf yet, sorry. You can try copying 'Makefile.in'
to 'Makefile' and replacing @CONFIGVARS@ by hand. Otherwise
e-mail me and I'll try to help.
On some platforms, it may be necessary to use different
compilation flags for shared objects than those which are
statically linked. If this is the case, run 'make clean'
before 'make package'. This will recompile all the .o files
with (hopefully!) the appropriate flags for shared objects.
To try Cost out before installing it, set the environment variable
COSTLIB to point to the 'lib' directory underneath where you unpacked
the distribution:
setenv COSTLIB `pwd`/lib
A couple other targets you might want:
make costsh ;# build Tcl interpreter with Cost package included
make costwish ;# Tcl interpreter with Cost and Tk built in
make lib ;# build static library libcost.a
To build 'costwish', you must specify --with-tk=
to the 'configure' command, where specifies the location
of tkConfig.sh.
================================================================================
BUILDING COST UNDER WINDOWS
NOTE: a binary distribution for Windows *may* be available as a
self-extracting executable or ZIP file here:
If you have the CYGWIN toolkit, you can run
cd src
sh cygconfig.sh ;# note: autoconf configure script doesn't work
make package
This builds Cost as a dynamically loadable library.
I haven't been able to build a standalone executable yet,
and you'll have to install stuff by hand:
set COSTLIB=C:\PROGRA~1\TCL\Lib\COST22
rem ... or wherever you want to put it...
rem Note that Tcl only looks in %TCLDIR%\Lib for packages,
rem where %TCLDIR% is Tcl's installation directory (default
rem "\Program Files\Tcl")
mkdir %COSTLIB%
copy libcost2.2.dll %COSTLIB%
copy ..\lib\*.* %COSTLIB%
You can also try:
make -n install | /bin/sh
For MSVC, there is a 'makefile.vc' file in the 'src' directory
which *used* to work at one point. I don't know if it still does.
================================================================================
BUILDING COST ON OTHER PLATFORMS
... I have no idea ...
================================================================================
WHERE TO GET STUFF
Cost is available at
NSGMLS and SGMLS are available at:
and various mirror sites.
The primary Tcl/Tk site keeps moving around, but as of 2002
prepackaged binary and source distributions are available from
ActiveState and SourceForge:
The CYGWIN toolkit contains a Windows port of many GNU utilities,
including GCC. Find it at:
Building SGMLS and Tcl is fairly simple. Just unpack the
distributions, './configure', 'make', and (for Tcl) 'make install'.
You'll probably want to install the 'sgmls' executable somewhere
convenient as well like in /usr/local/bin.
Building SP/NSGMLS can be quite a bit more difficult. If you have a
smart enough C++ compiler, then "./configure; make" ought to do the
trick. If this doesn't work, abandon hope: try SGMLS instead.
================================================================================