
		    This is file "INSTALL", which is part of

             ======================================================

	      tgdb, a graphical frontend to gdb, the GNU debugger.

		Based on Tcl, Tk, TclX, TkSteal, Expect and BLT.

             ======================================================

			       Copyright (c) 1994
				       by
					
			   HighTec EDV-Systeme GmbH
			   Neue Bahnhofstr. 71
			   66386 St. Ingbert, Germany
			   Phone: +49 (68 94) 87 00 41
			   Fax:   +49 (68 94) 87 00 44
			   Email: tgdb@HighTec.saarlink.de


A. Installing tgdb (sources + binaries)
---------------------------------------

   This section assumes that you already have an executable tgdb_wish
(the interpreter for Tcl/Tk code). If you already installed a previous
release of tgdb, just copy (or move) tgdb_wish and the tcllib directory
into this directory (e.g. "rcp -r ../tgdb/tgdb_wish ../tgdb/tcllib .").
If you don't have tgdb_wish yet, you can get binary versions for the
following platforms:

* Linux/x86 1.x:
  sunsite.unc.edu:/pub/Linux/devel/debuggers/tgdb_wish-linux.*
  (static and shared binaries; requires XFree86[tm] 2.x)

* SunOS 4.x:
  ftp.aud.alcatel.com:/tcl/code/tgdb_wish-sunos4.1.3.*
  (Thanks to Jonathan Swartz <swartz@cs.cornell.edu>)

* HPUX 9.x:
  ftp.aud.alcatel.com:/tcl/code/tgdb-HPUX-bin.*
  (Thanks to Lutz Vieweg <lkv@mania.robin.de>)

* AIX 3.2 (RS6000):
  ftp.aud.alcatel.com:/tcl/code/tgdb_wish-AIX32RS6k.*
  (static binary)

Please check ftp.aud.alcatel.com:/tcl/code to see if there is a binary release
of tgdb_wish for your platform available. If not, you will have to build it
yourself (as explained in section B). Binary releases contain the tgdb_wish
and the tcllib directory, which you should copy (or move) into this directory.

   If you allow tgdb to live in this directory (which is what I recommend,
since it makes updating or un-installing much easier), and if you can live
with tgdb's default values (see below), then all you have to do is type in:

	./maketgdb

and add the name of this directory to the environment variable `PATH' -
that's it. Now you can start tgdb by typing:

	tgdb [gdb_options_and_files]

where `[gdb_options_and_files]' are exactly the same arguments which you'd
pass to gdb itself. Don't forget: since tgdb is an X application, X has to
be fired up first before using tgdb. As soon as tgdb is running, you should
activate the `Help->tgdb' menu entry, and take a closer look at the online
help facility. You will probably want to write one of those famous
"hello world" programs to start with (... and remember the -g switch! :-).
Note: The generated startup script (tgdb) supposes that /bin/sh is the Bourne
shell (or some compatible shell, such as GNU bash).

Here are the default values for the installation of tgdb:

	1) all tgdb related files are placed in this directory
	2) the name of the debugger used by tgdb is "gdb"
	3) this gdb uses "(gdb) " as its prompt
	4) X is configured for (at least) 1024x768 pixels and 256 colors

2), 3) and 4) can be overwritten by setting environment variables, and you
can change all defaults by editing the appropriate variables in `maketgdb'.
After changing this file, you should proceed as mentioned above. You may
also edit the file Tgdb (or Tgdb-small, respectively) to make sure that
the application defaults meet your personal taste.

NOTE: When tgdb is started for the first time, it will examine which commands
      gdb uses. This takes a minute or so, and the commands will be stored in
      the file `~/.t"$TGDB_DEBUGGER"_help', which means that (1) the next time
      you start tgdb, the required information is already there, and (2) since
      the information is stored in the user's home directory, the startup delay
      caused by the "command retrieval" happens for each new user and for each
      new `$TGDB_DEBUGGER'. This eats up some disk space, but allows each
      user to have his own version of gdb (and even different versions, e.g.
      for cross-development purposes).

         If tgdb doesn't react on keyboard accelerators (e.g. "Alt-i"), you
      should exit from tgdb and type the following commands on the shell's
      command line:

	 xmodmap -e "clear mod2"
	 xmodmap -e "add mod2 = Mode_switch Alt_L"

      This tells X to use the "Alt" and "Alt Gr" keys as "mod2" modifiers.
      You may add these two lines to your "~/.xinitrc" file, so you don't
      have to type them each time you start the X server. If the accelerators
      still don't work, you should check the window manager's initialization
      file (e.g. "~/.fvwmrc") to see if it uses some of these sequences for
      its own purposes.


B. Building tgdb_wish
---------------------

   To build tgdb_wish, the Tcl/Tk interpreter for tgdb's code, the following
packages are needed:

   tcl7.3
   tk3.6 (or tk3.6pl1)
   tclX7.3a (or tclX7.3b)
   BLT1.3 (or newer)
   TkSteal3.6c (or newer)
   expect5.3 (or newer)

Note: BLT-1.7 introduces a bug which causes a coredump when you click on
the "TOC" and "Index" buttons of tgdb's help window. Therefore it is
recommended to use BLT-1.3 (try "archie -c blt-1.3" to find a server
which provides this version).

These packages are available via anonymous FTP on:

   ftp.aud.alcatel.com:/tcl
   ftp.cs.berkeley.edu:/ucb/tcl
   ftp.ibp.fr:/pub/tcl
   nic.funet.fi:/pub/languages/tcl
   syd.dit.csiro.au:/pub/{tcl,tk}
   ftp.cs.tu-berlin.de:/pub/tcl
   ftp.cme.nist.gov:/pub/expect (Expect only!)

and many other ftp sites around the planet. The Tcl/Tk extensions (such
as BLT and TkSteal) can be found in subdirectories called "extensions" or
"contrib/extensions", depending on the server's naming conventions. Please
make sure that you get the versions mentioned above, since older versions
might not work with tgdb (newer versions should be okay, as long as their
major version number is identical). Unpack the distributions according to
the following directory structure:

				    tcldev/
				       |
	   +----------+------------+---+-------+----------+---------+
	   |	      |		   |	       |	  |	    |
	TkSteal/   blt-1.3/   expect-5.3/   tcl7.3/   tclX7.3a/   tk3.6/

Now build the packages (as described in their INSTALL and README files) in the
following order: Tcl, Tk, TclX, BLT, TkSteal and last, but not least, Expect.
You will only need the libraries created by the first five packages, so you
can remove the "*tcl*sh" and "*wish*" executables to save disk space. Most
of the packages compile "out of the box" (thanks to GNU's autoconf program),
provided the directory structure appears as shown above.

NOTE: THE INSTRUCTIONS BELOW ARE ONLY VALID IF YOU HAVE THE EXACT VERSIONS
      OF EXPECT (5.3) AND TKSTEAL (3.6c) MENTIONED ABOVE!

Before you start to build Expect (i.e. after you typed "configure", but before
you start "make"), copy the files "exp_main_tk.c", "exp_main_sub.c" and
"exp_main_exp.c" from the "./expect" subdirectory to the "expect-5.3/"
directory. Then run a "diff" between "./expect/Makefile" and
"expect-5.3/Makefile" to see what should be added to the latter Makefile
(Note: "./expect/Makefile" was configured for a Linux box, so you should only
look for differences concerning the extensions, such as the definition of
STEALINC). After you've changed the "expect-5.3/Makefile" appropriately, you
can type "make", which should produce the executable named "expectk". Now you
can copy (or move) that program to this directory (".") and rename it
"tgdb_wish".

IF YOU CAN ONLY GET NEWER VERSIONS OF EXPECT AND/OR ANY OTHER EXTENSION,

unpack the distributions according in the directory hierarchy shown above,
then build them as described in their documentation (Tcl first, then Tk, TclX,
BLT, Expect, and TkSteal). You do not necessarily have to install the packages.
When you type "configure" for configuring TkSteal, you will have to add the
following options: "-with-tclX -with-blt -with-expect". This will create a
"Makefile" which produces an executable called "steal-wish". Copy (or move)
this program to the tgdb directory, and rename it "tgdb_wish".

If you don't want to install Tcl/Tk and the various extensions on your system,
you will have to create the Tcl library directory manually (note: the TCLDEV
variable used below should point to the tcldev/ directory; note also, that the
version numbers may vary if you have different distributions):

  * "cd" to the tgdb directory
  * mkdir tcllib; cd tcllib
  * copy the following files from $TCLDEV/tclX7.3b/tclmaster to ".":
    TclInit.tcl, buildidx.tcl, loadouster.tcl, tcl.tlib, tcl.tndx
  * copy the following files from $TCLDEV/tclX7.3b/tkmaster to ".":
    prolog.ps, tk.tcl, tk.tlib, tk.tndx
  * rcp -r $TCLDEV/blt-1.3/library/dd_protocols .
  * cp $TCLDEV/blt-1.3/library/bltGraph.pro .
  * cp $TCLDEV/TkSteal/library/tkSteal.tcl .
  * copy the following files from $TCLDEV/tcl7.3/library to ".":
    init.tcl, parray.tcl, tclIndex
  * copy the following files from $TCLDEV/tk3.6pl1/library to ".":
    {button,dialog,entry,listbox,menu,text,tkerror}.tcl
  * cat $TCLDEV/tk3.6pl1/library/tclIndex >> tclIndex
  * TCL_LIBRARY=`pwd`; TK_LIBRARY=`pwd`; BLT_LIBRARY=`pwd`
  * export TCL_LIBRARY TK_LIBRARY BLT_LIBRARY
  * start the wish: ../tgdb_wish, then enter:
    auto_mkindex . *.tcl dd_protocols/*.tcl
    exit
  * cd ..

Afterwards, simply proceed as described in section A.

We would like to hear from you once the new tgdb_wish is built, so that we
can make a binary tgdb release for this platform. This would prevent people
from repeatedly reinventing the wheel, and would save some valuable
resources (bandwidth, disk space, time, nerves, ... :-).
Thank you in advance for your help!

================================================================================


Hope you enjoy tgdb - or, as "Steven.Tyler@Aerosmith.COM" would say:
"Get a grip", "Rock this way", and you "Gotta love it"...


HighTec EDV-Systeme GmbH
