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

	teTeX-0.4 installation instructions (compiling the sources)

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

  1) prerequisites: disk space, gcc, GNU make, flex
  2) getting the files
  3) install the inputs-tree
  4) unpack the sources
  5) adjust the Makefile
  6) run make
  7) final configuration steps
  A) appendix: notes on some platforms

============================================================================
  1) prerequisites: disk space, gcc, GNU make, flex
============================================================================

To compile teTeX, you need gcc, flex and a recent version of GNU make.
gcc-2.5.8, flex-2.4.7 and GNU make-3.72.1 or newer should be ok.

The gzipped source tree is about 3.8MB, after untarring about 14.8MB,
after "make world" completes about 30MB.

=============================================================================
  2) getting the files
============================================================================

What you need:
    sources/teTeX-src-0.4.tar.gz  # the sources
    sources/teTeX-src-0.4-patch-*.gz    # all patches (if available)
    sources/teTeX-lib-0.4.tar.gz  # the lib-tree with the fonts, macros, ...

Instead of the complete lib-tree, you can get the smaller files with
fonts, documentation, ... from the other subdirectories. See INSTALL.bin
for notes on installing these files. You do not need to install binaries
when installing via INSTALL.bin.

============================================================================
  3) install the inputs-tree
============================================================================

Unpack teTeX-lib-0.4.tar.gz at its "final" destination, e.g.

	cd /usr/local
	gzip -dc /usr/local/src/teTeX-lib-0.4.tar.gz | tar xpvf -

You may choose a different directory instead of /usr/local and you may
rename the teTeX directory. Just make sure to have the TETEXDIR
variable in the top-level Makefile right before starting make.

Note: if you omit the "p" option of tar, you may have trouble with
      permissions later.

If you install the smaller packages from the base, fonts, doc and goodies
directories, use install.sh (see INSTALL.bin for details).

============================================================================
  4) unpack the sources
============================================================================

Unpack the sources, e.g.:
	cd /usr/local/src
	gzip -dc teTeX-src-0.4.tar.gz | tar xpvf -

============================================================================
  5) adjust the Makefile
============================================================================

Have a look at the Makefile and adjust what needs to be adjusted. E.g.:

	cd teTeX-src-0.4
	vi Makefile

============================================================================
  6) run make
============================================================================

Type "make world" and relax :-)

This is equivalent to
  make config clean texhash all install ini

If you need special previleges for 'make install' and 'make ini', you can
run two make in two separate runs:
  make config clean texhash all
  su
  make install ini

If you install for a second, third, ... platform, you can omit the 'texhash'
and 'ini' targets and simply run:
  make config clean all
  make install

Please note that calling make with an absolute path breaks the configure
scripts.

The following example _does_not_work_:
	/usr/local/bin/make world
	...
	checking whether /usr/local/bin/make sets $MAKE... ./configure:
	${ac_cv_prog_make_/usr/bin/make_set+set}: bad substitution
	...

============================================================================
  7) final configuration steps
============================================================================

Overview:
  - set up PATH
  - check environment
  - configure teTeX using texconfig

Set up PATH:
===========
Set up your PATH to include the directory containing the just installed
binaries (e.g. /usr/local/teTeX/bin/sparc-sunos4.1.3); similarly, MANPATH
and INFOPATH to include the relevant newly installed subdirectories.

Check environment
=================
Note, that the run-time search paths for all programs that use
the Kpathsea library can be configured by changing the paths in
TETEXDIR/texmf.cnf and changes to these paths does not require to
recompile any of the programs. Therefore, you hardly need to set extra
environment variables. If you define some environment variables, they
overrule the search paths in texmf.cnf unless they have an empty path
component (i.e. a colon at the beginning or end or a doubled colon in
the middle).

The variables to check are:
  BIBINPUTS BSTINPUTS DVIPSHEADERS GFFONTS GLYPHFONTS MFBASES MFINPUTS
  MFPOOL MPMEMS MPINPUTS MPPOOL MPSUPPORT PKFONTS TEXCONFIG TEXFONTS
  TEXFORMATS TEXINPUTS TEXMFCNF TEXPICTS TEXPKS TEXPOOL TFMFONTS VFFONTS
  DVIPSFONTS XDVIVFS XDVIFONTS DVILJFONTS TRFONTS

A simple way to check them is to run
  texconfig confall
once you have set up your PATH. Be careful if some variables are non-empty
and have a look at the locations of the binaries. Not all binaries are
checked, only some.

Configure teTeX using texconfig
===============================
Texconfig allows you to set the defaults for hyphenation, paper size,
print command, metafont mode, etc. You should run theis command
interactively and see what options it offers.

=============================================================================
 A) appendix: notes on some platforms
=============================================================================

SGI-IRIX-6.0.1: (reported by bottoms@radar.nrl.navy.mil (Maitland Bottoms))
	successfully compiled using:
		CC=cc
		CFLAGS=-O2 -s -32
		LDFLAGS=-s -32
HP-UX 10.10:
	successfully compiled using:
		CC     = cc
		CFLAGS = -Ae +O3
		INSTALL= bsdinst -c

AIX-4.2 (and newer?): set
  override XINC    = --x-includes=/usr/include/X11
  override XLIB    = --x-libraries=/usr/lib

Digital Unix 4.0: (and newer?) Add
    -DPOINTER_IS_NOT_INT
  to CFLAGS.

NEXTSTEP 3.x: (Gregor Hoffleit <flight@mathi.uni-heidelberg.de>)
      - compile using GNU sed and GNU make
      - normal compilation (one platform):
	    CC=cc in Makefile
      - cross compilation (`FAT'):
	    CC=cc -arch m68k -arch i386 -arch hppa -arch sparc
      - dvips on HP-PA: compile dvipsk/output.c without optimization
        (no -O)!

      NOTE: there are some teTeX/NeXT specific files available via
      ftp and on the web. The URLs are:
        http://www.mathi.uni-heidelberg.de/~flight/stepTeX
      and in the directory teTeX/contrib/NeXT on the ftp servers where
      teTeX is available, e.g.:
        ftp://ftp.dante.de/tex-archive/systems/unix/teTeX/contrib/NeXT

      You can find there a patch set that adds NeXTTeX IPC support to
      the teTeX sources (-v, -V) and a TeXview.app with kpathsearch
      support. The new TeXview.app can find the fonts files using
      the same searching routines than all the other programs in
      teTeX. The old one only works with a flat font directory structure
      (i.e. all files in a single directory).
        
      See http://www.mathi.uni-heidelberg.de/~flight/stepTeX for further
      instructions. ftp://zarquon.mathi.uni-heidelberg.de/pub/NeXT/TeX is
      the primary site for the kpathsearch-TeXview.app and teTeX-NEXTSTEP
      patches.

SunOS 4.1.3:
  The shared libXmu from OpenWindows is buggy on some SunOS 4.1.3
  systems.  It is small, so link it statically. To do so, set
  BROKEN_SUNOS_LIBXMU=yes in Makefile.
