Home | History | Annotate | Line # | Download | only in build.unix
      1  1.1  christos #	Id: README,v 8.29 2001/05/13 20:52:36 skimo Exp  (Berkeley) Date: 2001/05/13 20:52:36 
      2  1.1  christos 
      3  1.1  christos Nvi uses the GNU autoconf program for configuration and compilation.  You
      4  1.1  christos should enter:
      5  1.1  christos 
      6  1.1  christos 	../dist/configure
      7  1.1  christos 	make
      8  1.1  christos 
      9  1.1  christos and nvi will configure the system and build one or two binaries:  nvi and
     10  1.1  christos tknvi.  You can use any path to the configure script, e.g., to build for
     11  1.1  christos an x86 architecture, I suggest that you do:
     12  1.1  christos 
     13  1.1  christos 	mkdir build.x86
     14  1.1  christos 	cd build.x86
     15  1.1  christos 	../dist/configure
     16  1.1  christos 	make
     17  1.1  christos 
     18  1.1  christos There are options that you can specify to the configure command.  See
     19  1.1  christos the next section for a description of these options.
     20  1.1  christos 
     21  1.1  christos If you want to rebuild or reconfigure nvi, for example, because you change
     22  1.1  christos your mind as to the curses library that you want to use, create a new
     23  1.1  christos directory and reconfigure it using "configure" and whatever options you
     24  1.1  christos choose, don't try to selectively edit the files.
     25  1.1  christos 
     26  1.1  christos By default, nvi is installed as "vi", with hard links to "ex" and "view".
     27  1.1  christos To install them using different names, use the configure program options.
     28  1.1  christos For example, to install them as "nvi", "nex" and "nview", use:
     29  1.1  christos 
     30  1.1  christos 	configure --program-prefix=n
     31  1.1  christos 
     32  1.1  christos See the section below on installation for details.
     33  1.1  christos 
     34  1.1  christos Note, if you're building nvi on a LynxOS system, you should read the
     35  1.1  christos README.LynxOS file in this directory for additional build instructions
     36  1.1  christos that are specific to that operating system.
     37  1.1  christos 
     38  1.1  christos If you have trouble with this procedure, send email to the addresses
     39  1.1  christos listed in ../README.  In that email, please provide a complete script
     40  1.1  christos of the output for all of the above commands that you entered.
     41  1.1  christos 
     42  1.1  christos =-=-=-=-=-=-=
     43  1.1  christos NVI'S OPTIONS TO THE CONFIGURE PROGRAM
     44  1.1  christos =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     45  1.1  christos 
     46  1.1  christos There are many options that you can enter to the configuration program.
     47  1.1  christos To see a complete list of the options, enter "configure --help".  Only
     48  1.1  christos a few of them are nvi specific.  These options are as follows:
     49  1.1  christos 
     50  1.1  christos   --disable-re            DON'T use the nvi-provided RE routines.
     51  1.1  christos   --enable-debug          Build a debugging version.
     52  1.1  christos   --enable-perlinterp     Include a Perl interpreter in vi.
     53  1.1  christos   --enable-tclinterp      Include a Tk/Tcl interpreter in vi.
     54  1.1  christos   --enable-gtk		  Build a gtk front-end.
     55  1.1  christos   --enable-motif	  Build a motif front-end.
     56  1.1  christos   --enable-threads	  Turn on thread support.
     57  1.1  christos   --enable-widechar	  Build a wide character aware vi (experimental).
     58  1.1  christos   --with-curses=DIR       Path to curses installation.
     59  1.1  christos   --with-db3=db3prefix    Path to db3 installation.
     60  1.1  christos   --enable-dynamic-loading Load DB 3 dynamically.
     61  1.1  christos 
     62  1.1  christos disable-re:
     63  1.1  christos 	By default, nvi loads its own versions of the POSIX 1003.2 Regular
     64  1.1  christos 	Expression routines (which are Henry Spencer's implementation).
     65  1.1  christos 	If your C library contains an implementation of the POSIX 1003.2
     66  1.1  christos 	RE routines (note, this is NOT the same as the historic UNIX RE
     67  1.1  christos 	routines), and you want to use them instead, enter:
     68  1.1  christos 
     69  1.1  christos 	--disable-re
     70  1.1  christos 
     71  1.1  christos 	as an argument to configure, and the RE routines will be taken
     72  1.1  christos 	from whatever libraries you load.  Please ensure that your RE
     73  1.1  christos 	routines implement Henry Spencer's extensions for doing vi-style
     74  1.1  christos 	"word" searches.
     75  1.1  christos 
     76  1.1  christos enable-debug:
     77  1.1  christos 	If you want to build nvi with no optimization (i.e. without -O
     78  1.1  christos 	as a compiler flag), with -g as a compiler flag, and with DEBUG
     79  1.1  christos 	defined during compilation, enter:
     80  1.1  christos 
     81  1.1  christos 	--enable-debug
     82  1.1  christos 
     83  1.1  christos 	as an argument to configure.
     84  1.1  christos 
     85  1.1  christos enable-perlinterp:
     86  1.1  christos 	If you have the Perl 5 libraries and you want to compile in the
     87  1.1  christos 	Perl interpreter, enter:
     88  1.1  christos 
     89  1.1  christos 	--enable-perlinterp
     90  1.1  christos 
     91  1.1  christos 	as an argument to configure.  (Note: this is NOT possible with
     92  1.1  christos 	Perl 4, or even with Perl 5 versions earlier than 5.002.)
     93  1.1  christos 
     94  1.1  christos enable-tclinterp:
     95  1.1  christos 	If you have the Tk/Tcl libraries and you want to compile in the
     96  1.1  christos 	Tcl/Tk interpreter, enter:
     97  1.1  christos 
     98  1.1  christos 	--enable-tclinterp
     99  1.1  christos 
    100  1.1  christos 	as an argument to configure.  If your Tk/Tcl include files and
    101  1.1  christos 	libraries aren't in the standard library and include locations,
    102  1.1  christos 	see the next section of this README file for more information.
    103  1.1  christos 
    104  1.1  christos enable-gtk:
    105  1.1  christos 	If you have the Gtk libraries and you want to build the Gtk
    106  1.1  christos 	nvi front-end, enter:
    107  1.1  christos 
    108  1.1  christos 	--enable-gtk
    109  1.1  christos 
    110  1.1  christos 	as an argument to configure.  If your Gtk include files and
    111  1.1  christos 	libraries aren't in the standard library and include locations,
    112  1.1  christos 	see the next section of this README file for more information.
    113  1.1  christos 	See also the enable-threads option.
    114  1.1  christos 
    115  1.1  christos enable-motif:
    116  1.1  christos 	If you have the Motif libraries and you want to build the Motif
    117  1.1  christos 	nvi front-end, enter:
    118  1.1  christos 
    119  1.1  christos 	--enable-motif
    120  1.1  christos 
    121  1.1  christos 	as an argument to configure.  If your Motif include files and
    122  1.1  christos 	libraries aren't in the standard library and include locations,
    123  1.1  christos 	see the next section of this README file for more information.
    124  1.1  christos 
    125  1.1  christos enable-threads:
    126  1.1  christos 	If you want to be able to use multiple windows in the Gtk
    127  1.1  christos 	front-end, you should specify this option.
    128  1.1  christos 
    129  1.1  christos with-curses:
    130  1.1  christos 	Specifies the path where curses is installed.
    131  1.1  christos 
    132  1.1  christos with-db3:
    133  1.1  christos 	Specifies the path where DB3 is installed.
    134  1.1  christos 	See README.DB3 for more information about DB3.
    135  1.1  christos 
    136  1.1  christos enable-dynamic-loading:
    137  1.1  christos 	Dynamically load DB3 library.
    138  1.1  christos 	See README.DB3 for more information about DB3.
    139  1.1  christos 
    140  1.1  christos enable-widechar:
    141  1.1  christos 	Enables support for wide characters.
    142  1.1  christos 	Note that this is still rather experimental.
    143  1.1  christos 
    144  1.1  christos 	If you try this out on Solaris, you will want to point nvi
    145  1.1  christos 	to the curses in /usr/xpg4/ which is CSI compliant.
    146  1.1  christos 
    147  1.1  christos =-=-=-=-=-=-=
    148  1.1  christos ADDING OR CHANGING COMPILERS, OR COMPILE OR LOAD LINE FLAGS
    149  1.1  christos =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    150  1.1  christos 
    151  1.1  christos If you want to use a specific compiler, specify the CC environment
    152  1.1  christos variable before running configure.  For example:
    153  1.1  christos 
    154  1.1  christos 	env CC=gcc configure
    155  1.1  christos 
    156  1.1  christos Using anything other than the native compiler will almost certainly
    157  1.1  christos mean that you'll want to check the compile and load line flags, too.
    158  1.1  christos 
    159  1.1  christos If you want to specify additional load line flags, specify the ADDLDFLAGS
    160  1.1  christos environment variable before running configure.  For example:
    161  1.1  christos 
    162  1.1  christos 	env ADDLDFLAGS="-Q" configure
    163  1.1  christos 
    164  1.1  christos would specify the -Q flag in the load line when the nvi programs are
    165  1.1  christos loaded.
    166  1.1  christos 
    167  1.1  christos If you don't want configure to use the default load line flags for the
    168  1.1  christos system, specify the LDFLAGS environment variable before running configure.
    169  1.1  christos For example:
    170  1.1  christos 
    171  1.1  christos 	env LDFLAGS="-32" configure
    172  1.1  christos 
    173  1.1  christos will cause configure to set the load line flags to "-32", and not set
    174  1.1  christos them based on the current system.
    175  1.1  christos 
    176  1.1  christos If you want to specify additional compile line flags, specify the
    177  1.1  christos ADDCPPFLAGS environment variable before running configure.  For example:
    178  1.1  christos 
    179  1.1  christos 	env ADDCPPFLAGS="-I../foo" configure
    180  1.1  christos 
    181  1.1  christos would cause the compiler to be passed the -I../foo flag when compiling
    182  1.1  christos test programs during configuration as well as when building nvi object
    183  1.1  christos files.
    184  1.1  christos 
    185  1.1  christos If you don't want configure to use the default compile line flags for the
    186  1.1  christos system, specify the CPPFLAGS environment variable before running configure.
    187  1.1  christos For example:
    188  1.1  christos 
    189  1.1  christos 	env CPPFLAGS="-I.." configure
    190  1.1  christos 
    191  1.1  christos will cause configure to use "-I.." as the compile line flags instead of
    192  1.1  christos the default values.
    193  1.1  christos 
    194  1.1  christos =-=-=-=-=-=-=
    195  1.1  christos ADDING LIBRARIES AND INCLUDE FILES
    196  1.1  christos =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    197  1.1  christos 
    198  1.1  christos If the Tk/Tcl or any other include files or libraries are in non-standard
    199  1.1  christos places on your system, you will need to specify the directory path where
    200  1.1  christos they can be found.
    201  1.1  christos 
    202  1.1  christos If you want to specify additional library paths, set the ADDLIBS environment
    203  1.1  christos variable before running configure.  For example:
    204  1.1  christos 
    205  1.1  christos 	env ADDLIBS="-L/a/b -L/e/f -ldb" configure
    206  1.1  christos 
    207  1.1  christos would specify two additional directories to search for libraries, /a/b
    208  1.1  christos and /e/f, and one additional library to load, "db".
    209  1.1  christos 
    210  1.1  christos If you want to specify additional include paths, specify the ADDCPPFLAGS
    211  1.1  christos environment variable before running configure.  For example:
    212  1.1  christos 
    213  1.1  christos 	env ADDCPPFLAGS="-I/usr/local/include" LIBS="-ldb" configure
    214  1.1  christos 
    215  1.1  christos would search /usr/local/include for include files, as well as load the db
    216  1.1  christos library as described above.
    217  1.1  christos 
    218  1.1  christos As a final example, let's say that you've downloaded ncurses from the net
    219  1.1  christos and you've built it in a directory named ncurses which is at the same
    220  1.1  christos level in the filesystem hierarchy as nvi.  You would enter something like:
    221  1.1  christos 
    222  1.1  christos 	env ADDCPPFLAGS="-I../../ncurses/include" \
    223  1.1  christos 	    ADDLIBS="-L../../ncurses/libraries" configure
    224  1.1  christos 
    225  1.1  christos to cause nvi to look for the curses include files and the curses library
    226  1.1  christos in the ncurses environment.
    227  1.1  christos 
    228  1.1  christos Notes:
    229  1.1  christos 	Make sure that you prepend -L to any library directory names, and
    230  1.1  christos 	that you prepend -I to any include file directory names!  Also,
    231  1.1  christos 	make sure that you quote the paths as shown above, i.e. with
    232  1.1  christos 	single or double quotes around the values you're specifying for
    233  1.1  christos 	ADDCPPFLAGS and ADDLIBS.
    234  1.1  christos 
    235  1.1  christos 	=-=-=-=-=-=
    236  1.1  christos 	You should NOT need to add any libraries or include files to load
    237  1.1  christos 	the Perl5 interpreter.  The configure script will obtain that
    238  1.1  christos 	information directly from the Perl5 program.  This means that the
    239  1.1  christos 	configure script must be able to find perl in its path.  It looks
    240  1.1  christos 	for "perl5" first, and then "perl".  If you're building a Perl
    241  1.1  christos 	interpreter and neither is found, it's a fatal error.
    242  1.1  christos 
    243  1.1  christos 	=-=-=-=-=-=
    244  1.1  christos 	You do not need to specify additional libraries to load Tk/Tcl,
    245  1.1  christos 	Perl or curses, as the nvi configuration script adds the
    246  1.1  christos 	appropriate libraries to the load line whenever you specify
    247  1.1  christos 	--enable-tknvi or other Perl or Tk/Tcl related option, or build
    248  1.1  christos 	the Tk/Tcl or curses version of nvi.  The library names that are
    249  1.1  christos 	automatically loaded are as follows:
    250  1.1  christos 
    251  1.1  christos 	for Perl:	-lperl
    252  1.1  christos 	for Tk/Tcl:	-ltk -ltcl -lm
    253  1.1  christos 	for curses:	-lcurses
    254  1.1  christos 
    255  1.1  christos 	In addition, the configure script loads:
    256  1.1  christos 
    257  1.1  christos 		... the X libraries when loading the Tk/Tcl libraries,
    258  1.1  christos 		    if they exist.
    259  1.1  christos 
    260  1.1  christos 		... the -ltermcap or -ltermlib libraries when loading
    261  1.1  christos 		    any curses library, if they exist.
    262  1.1  christos 
    263  1.1  christos 	=-=-=-=-=-=
    264  1.1  christos 	The env command is available on most systems, and simply sets one
    265  1.1  christos 	or more environment variables before running a command.  If the
    266  1.1  christos 	env command is not available to you, you can set the environment
    267  1.1  christos 	variables in your shell before running configure.  For example,
    268  1.1  christos 	in sh or ksh, you could do:
    269  1.1  christos 
    270  1.1  christos 		ADDLIBS="-L/a/b -L/e/f -ldb" configure
    271  1.1  christos 
    272  1.1  christos 	and in csh or tcsh, you could do:
    273  1.1  christos 
    274  1.1  christos 		setenv ADDLIBS "-L/a/b -L/e/f -ldb"
    275  1.1  christos 		configure
    276  1.1  christos 
    277  1.1  christos 	See your shell manual page for further information.
    278  1.1  christos 
    279  1.1  christos =-=-=-=-=-=-=
    280  1.1  christos INSTALLING NVI
    281  1.1  christos =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    282  1.1  christos 
    283  1.1  christos Nvi installs the following files into the following locations, with
    284  1.1  christos the following default values:
    285  1.1  christos 
    286  1.1  christos Variables:		Default value:
    287  1.1  christos prefix			/usr/local
    288  1.1  christos exec_prefix		$(prefix)
    289  1.1  christos bindir			$(prefix)/bin
    290  1.1  christos datadir			$(prefix)/share
    291  1.1  christos mandir			$(prefix)/man
    292  1.1  christos 
    293  1.1  christos File(s):		Default location
    294  1.1  christos ----------------------------------------
    295  1.1  christos vi			$(bindir)/vi
    296  1.1  christos vi.1			$(mandir)/man1/vi.1
    297  1.1  christos vi.0			$(mandir)/cat1/vi.0
    298  1.1  christos Perl scripts		$(datadir)/vi/perl/
    299  1.1  christos Tcl scripts		$(datadir)/vi/tcl/
    300  1.1  christos Message Catalogs	$(datadir)/vi/catalog/
    301  1.1  christos 
    302  1.1  christos Notes:
    303  1.1  christos 	There are two hard links to the vi program, named ex and view.
    304  1.1  christos 	Similarly, there are two hard links to the unformatted vi manual
    305  1.1  christos 	page, named ex.1 and view.1, and two hard links to the formatted
    306  1.1  christos 	manual page, named ex.0 and view.0.  These links are created when
    307  1.1  christos 	the program and man pages are installed.
    308  1.1  christos 
    309  1.1  christos 	If you want to install vi, ex, view and the man pages as nvi, nex,
    310  1.1  christos 	nview, use the configure option --program-prefix=n.  Other, more
    311  1.1  christos 	complex transformations are possible -- use configure --help to
    312  1.1  christos 	see more options.
    313  1.1  christos 
    314  1.1  christos 	To move the entire installation tree somewhere besides /usr/local,
    315  1.1  christos 	change the value of both "exec_prefix" and "prefix".  To move the
    316  1.1  christos 	binaries to a different place, change the value of "bindir".
    317  1.1  christos 	Similarly, to put the datafiles (the message catalogs, Perl and
    318  1.1  christos 	Tcl scripts) or the man pages in a different place, change the
    319  1.1  christos 	value of "datadir" or "mandir".  These values can be changed as
    320  1.1  christos 	part of configuration:
    321  1.1  christos 
    322  1.1  christos 		configure --exec_prefix=/usr/contrib --prefix=/usr/share
    323  1.1  christos 
    324  1.1  christos 	or when doing the install itself:
    325  1.1  christos 
    326  1.1  christos 		make exec_prefix=/usr/contrib prefix=/usr/contrib install
    327  1.1  christos 
    328  1.1  christos 	The datafile directory (e.g., /usr/local/share/vi by default) is
    329  1.1  christos 	completely removed and then recreated as part of the installation
    330  1.1  christos 	process.
    331  1.1  christos 
    332  1.1  christos =-=-=-=-=-=-=
    333  1.1  christos NVI AND THE CURSES LIBRARY
    334  1.1  christos =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    335  1.1  christos 
    336  1.1  christos The major portability problem for nvi is selecting a curses library.
    337  1.1  christos Unfortunately, it is common to find broken versions of curses -- the
    338  1.1  christos original System V curses was broken, resulting in all vendors whose
    339  1.1  christos implementations are derived from System V having broken implementations
    340  1.1  christos in turn.
    341  1.1  christos 
    342  1.1  christos If you use the vendor's or other curses library, and you see any of the
    343  1.1  christos following symptoms:
    344  1.1  christos 
    345  1.1  christos 	+ Core dumps in curses routines.
    346  1.1  christos 	+ Missing routines when compiling.
    347  1.1  christos 	+ Repainting the wrong characters on the screen.
    348  1.1  christos 	+ Displaying inverse video in the wrong places.
    349  1.1  christos 	+ Failure to reset your terminal to the correct modes on exit.
    350  1.1  christos 
    351  1.1  christos you have a broken curses implementation, and you should reconfigure nvi
    352  1.1  christos to use another curses library.
    353  1.1  christos 
    354  1.1  christos An alternative for your vendor's curses is ncurses, available from
    355  1.1  christos ftp://ftp.gnu.org/pub/gnu/ncurses/
    356  1.1  christos 
    357  1.1  christos One final note.  If you see the following symptoms:
    358  1.1  christos 
    359  1.1  christos 	+ Line-by-line screen repainting instead of scrolling.
    360  1.1  christos 
    361  1.1  christos it usually means that your termcap or terminfo information is insufficient
    362  1.1  christos for the terminal.
    363