Sybtcl

INSTALLATION

Sybtcl can be added to standard Tcl's tclsh and wish, or to Extended Tcl's
tcl and wishx.  I recommend using Extended Tcl, as the sample programs
require Extended Tcl.

First, I would recommend that you start from a working Tcl/TclX/Tk base.
Compile all the code, run the 'test' targets, try out the tcl and wishx
interpreters.  Install tcl and wish into public directories (e.g.
/usr/local/bin) and the Tcl, TclX, and Tk library code (e.g., /usr/local/lib)
Also try out the widget demos from the Tk package.  Everything works? Good,
now you can start on Sybtcl.

Un-tar the sybtcl-2.1 distribution in a sibling directory to tcl7.3, tk3.6,
and tclX7.3a.

Makefiles are provided to build a standard tclsh and wish or Extended Tcl's
tcl and wishx.  Copy either Makefile.Tcl or Makefile.TclX to Makefile, and
customize the Makefile for your environment.  Follow the comments in the
Makefile.  You must also define your Sybase home directory.

Both Makefiles try to glean certain compile and link flags from Tcl and Tk
Makefiles.  A file "tclflags.mk" is built, and included on subsequent makes.
The Makefile.TclX uses the compile flags, but uses the SYSLIBS definition
in TclX for linking.

After you have customized your Makefile -

"make get-tcl-flags" or simply "make" will build the tclflags.mk the first time.
This step will ask you to review the tclflags.mk file.  If it looks reasonable,
continue.

"make" will copy the AppInit files from Tcl or TclX and add a call to Sybtcl's
initialization function via a sed(1) script.  The sybtcl.c and AppInit c
files will them be compiled, and executables produced.

"make tests" will run a small scrip to make sure the resulting
interpreter can access the database.

"make install" will copy the resulting executables and man page into the
specified directories.

Optionally, you can "make install-wisqlite" to copy the wisqlite program to
a directory, and change the #! interpreter line to reflect the Makefile
values.   (Makefile.TclX only)  
To install the full-blown UCO Wisql, see the source tree ./samples/uco

"make clean" will delete the .o files, executables, formatted man page,
and reset tclflags.mk to a firsttime: target.

You can add Sybtcl to other Tcl/Tk interpreters.  Add a call to
"Sybtcl_Init(interp)" to your tclAppInit.c or tkAppInit.c module, and link
with libSybtcl.a.

Try out the sample Sybtcl scripts.  It's also fun to start the tcl
interpreter, and just type in code on the fly.  Try benign SQL commands
at first, say:
	$ tcl
	tcl> sybconnect userid passwd   ** use a valid userid and passwd **
	tcl> sybsql sybtcl0 sp_who
	tcl> sybnext sybtcl0
	tcl> sybnext sybtcl0
	tcl> sybcols sybtcl0
	tcl> parray sybmsg

Sybtcl seems to fit in to the rest of Tcl/Extended Tcl/Tk without
name conflicts;  it does add about 150kb worth of Sybase DB-Library to
the tcl and wishx binaries on my machine.

The man page was written using -man macros.  Use your favorite nroff/troff
formatter, e.g. 
	nroff -man sybtcl.man > sybtcl.nr
	troff -Talw -man sybtcl.man | alw > sybtcl.ps
	psroff -Tdtps -t -man sybtcl.man > sybtcl.ps
	whatever


Tom Poindexter
tpoind@advtech.uswest.com
tpoindex@nyx.cs.du.edu
