To build xvi on Linux systems:

Linux
-----
	cd src
	make -f makefile.pos
	install -s xvi /usr/local/bin/
	install ../doc/help /usr/local/lib/xvi.help
	install ../doc/xvi.1 /usr/local/share/man/man1/

To make the Debian/Ubuntu package, say
	apt-get install debhelper build-essential libncurses-dev
	dpkg-buildpackage -rfakeroot
which will create you ../xvi*.deb that you can install with
	dpkg -i ../xvi*.deb

To run the test suite ("make check") you will also need to
	apt-get install expect tclsh
See test/README to run it without an X display.

To compile for smallest code size, install clang and use
	make CC=clang OPTFLAG=-Os

Other versions of Unix
----------------------
makefile.aix
	AIX (IBM's SysV-compatible UNIX)
makefile.bsd
	Berkeley UNIXs systems from the 1980s including 4.[123]BSD for VAX.
	On modern POSIX-compatible BSD systems use makefile.pos
makefile.hpx
	HP UNIX (HP-UX) with GNU cc
makefile.pos
	POSIX systems, including Linux and modern BSs,
makefile.q2t
	QNX 2 in terminal mode, using the CII C86 ANSI Compiler
makefile.q2w
	QNX 2 with Windows, using the CII C86 ANSI Compiler
makefile.q4t
	QNX V4.1 (POSIX-conformant) in terminal mode, using Watcom C Compiler
makefile.sol
	Solaris 2
makefile.sun
	SunOS
makefile.sv
	SunView
makefile.usg
	System V UNIX
makefile.xen
	Xenix on a 386
makefile.xwn
	Xwn/termcap combined version under X11

MS-DOS
------
makefile.386
	386 protected mode version using Zortech C 3.00 & PharLap DOS extender
makefile.bcc
	Borland C/C++
makefile.msc
	Microsoft C with Microsoft Macro Assembler (or compatible assembler)
	and a public-domain version of "make" (not Microsoft's Make, which is
	brain-dead)
makefile.qc
	Microsoft Quick C (standalone version) & Microsoft's make utility
makefile.tc
	Turbo C/C++ and TASM
makefile.zc2
	Zortech C 2.18
makefile.zc3
	Zortech C 3.00

MS-DOS clones
---------------
makefile.tos
	Atari ST with Megamax or Lattice 5.0 C compiler

OS/2
----
makefile.os2
	OS/2 with Microsoft's make, which is the stupidest make ever.


Installing required packages from source
----------------------------------------
xvi needs a termcap library and, to run the test suite, tcl and expect.
To install these from source code under your home directory:

# Termcap
	wget https://ftp.gnu.org/gnu/termcap/termcap-1.3.1.tar.gz
	gunzip < termcap*gz | tar xf -
	(cd termcap* && ./configure --prefix=$HOME && make install)
# Tcl
	wget http://prdownloads.sourceforge.net/tcl/tcl8.6.6-src.tar.gz
	gunzip < tcl*gz | tar xf -
	( cd tcl*/unix && ./configure --prefix=$HOME && make install )

# Find local versions. You can add these to .profile
export PATH=$HOME/bin:$PATH
export LD_LIBRARY_PATH=$HOME/lib
export TCL_LIBRARY=$HOME/lib/tcl8.6
export TCLLIBPATH=$HOME/lib
export MANPATH=$HOME/man:$MANPATH

# expect
wget https://downloads.sf.net/project/expect/Expect/5.45/expect5.45.tar.gz
gunzip < expect*gz | tar xf -
( cd expect*
  # On aarch64, expect 5.45 needs tclconfig/config.sub modifying to add:

         | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
         | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
>        | aarch64-* \
         | avr-* \
         | bs2000-* \

  ./configure --prefix=$HOME  # --build=aarch64-suse-linux
  make install
)
