1 # @(#)README 8.26 (Berkeley) 10/19/96
3 Nvi uses the GNU autoconf program for configuration and compilation. You
9 and nvi will configure the system and build one or two binaries: nvi and
10 tknvi. You can use any path to the configure script, e.g., to build for
11 an x86 architecture, I suggest that you do:
18 There are options that you can specify to the configure command. See
19 the next section for a description of these options.
21 If you want to rebuild or reconfigure nvi, for example, because you change
22 your mind as to the curses library that you want to use, create a new
23 directory and reconfigure it using "configure" and whatever options you
24 choose, don't try to selectively edit the files.
26 By default, nvi is installed as "vi", with hard links to "ex" and "view".
27 To install them using different names, use the configure program options.
28 For example, to install them as "nvi", "nex" and "nview", use:
30 configure --program-prefix=n
32 See the section below on installation for details.
34 Note, if you're building nvi on a LynxOS system, you should read the
35 README.LynxOS file in this directory for additional build instructions
36 that are specific to that operating system.
38 If you have trouble with this procedure, send email to the addresses
39 listed in ../README. In that email, please provide a complete script
40 of the output for all of the above commands that you entered.
43 NVI'S OPTIONS TO THE CONFIGURE PROGRAM
44 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
46 There are many options that you can enter to the configuration program.
47 To see a complete list of the options, enter "configure --help". Only
48 a few of them are nvi specific. These options are as follows:
50 --disable-curses DON'T use the nvi-provided curses routines.
51 --disable-db DON'T use the nvi-provided DB routines.
52 --disable-re DON'T use the nvi-provided RE routines.
53 --enable-debug Build a debugging version.
54 --enable-perlinterp Include a Perl interpreter in vi.
55 --enable-tclinterp Include a Tk/Tcl interpreter in vi.
56 --enable-tknvi Build a Tk/Tcl front-end for vi.
59 By default, nvi loads its own implementation of the curses
60 routines (which are a stripped-down version of the 4.4BSD curses
61 library). If you have your own curses library implementation and
62 you want to use it instead, enter:
66 as an argument to configure, and the curses routines will be taken
67 from whatever libraries you load. Note: System V based curses
68 implementations are usually broken. See the last section of this
69 README for further information about nvi and the curses library.
72 By default, nvi loads its own versions of the Berkeley DB routines
73 (which are a stripped-down version of DB 1.85). If you have your
74 own version of the Berkeley DB routines and you want to use them
79 as an argument to configure, and the DB routines will be taken
80 from whatever libraries you load. Make sure that the DB routines
81 you use are at least version 1.85 or later.
84 By default, nvi loads its own versions of the POSIX 1003.2 Regular
85 Expression routines (which are Henry Spencer's implementation).
86 If your C library contains an implementation of the POSIX 1003.2
87 RE routines (note, this is NOT the same as the historic UNIX RE
88 routines), and you want to use them instead, enter:
92 as an argument to configure, and the RE routines will be taken
93 from whatever libraries you load. Please ensure that your RE
94 routines implement Henry Spencer's extensions for doing vi-style
98 If you want to build nvi with no optimization (i.e. without -O
99 as a compiler flag), with -g as a compiler flag, and with DEBUG
100 defined during compilation, enter:
104 as an argument to configure.
107 If you have the Perl 5 libraries and you want to compile in the
108 Perl interpreter, enter:
112 as an argument to configure. (Note: this is NOT possible with
113 Perl 4, or even with Perl 5 versions earlier than 5.002.)
116 If you have the Tk/Tcl libraries and you want to compile in the
117 Tcl/Tk interpreter, enter:
121 as an argument to configure. If your Tk/Tcl include files and
122 libraries aren't in the standard library and include locations,
123 see the next section of this README file for more information.
126 If you have the Tk/Tcl libraries and you want to build the Tcl/Tk
127 nvi front-end, enter:
131 as an argument to configure. If your Tk/Tcl include files and
132 libraries aren't in the standard library and include locations,
133 see the next section of this README file for more information.
136 ADDING OR CHANGING COMPILERS, OR COMPILE OR LOAD LINE FLAGS
137 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
139 If you want to use a specific compiler, specify the CC environment
140 variable before running configure. For example:
144 Using anything other than the native compiler will almost certainly
145 mean that you'll want to check the compile and load line flags, too.
147 If you want to specify additional load line flags, specify the ADDLDFLAGS
148 environment variable before running configure. For example:
150 env ADDLDFLAGS="-Q" configure
152 would specify the -Q flag in the load line when the nvi programs are
155 If you don't want configure to use the default load line flags for the
156 system, specify the LDFLAGS environment variable before running configure.
159 env LDFLAGS="-32" configure
161 will cause configure to set the load line flags to "-32", and not set
162 them based on the current system.
164 If you want to specify additional compile line flags, specify the
165 ADDCPPFLAGS environment variable before running configure. For example:
167 env ADDCPPFLAGS="-I../foo" configure
169 would cause the compiler to be passed the -I../foo flag when compiling
170 test programs during configuration as well as when building nvi object
173 If you don't want configure to use the default compile line flags for the
174 system, specify the CPPFLAGS environment variable before running configure.
177 env CPPFLAGS="-I.." configure
179 will cause configure to use "-I.." as the compile line flags instead of
183 ADDING LIBRARIES AND INCLUDE FILES
184 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
186 If the Tk/Tcl or any other include files or libraries are in non-standard
187 places on your system, you will need to specify the directory path where
190 If you want to specify additional library paths, set the ADDLIBS environment
191 variable before running configure. For example:
193 env ADDLIBS="-L/a/b -L/e/f -ldb" configure
195 would specify two additional directories to search for libraries, /a/b
196 and /e/f, and one additional library to load, "db".
198 If you want to specify additional include paths, specify the ADDCPPFLAGS
199 environment variable before running configure. For example:
201 env ADDCPPFLAGS="-I/usr/local/include" LIBS="-ldb" configure
203 would search /usr/local/include for include files, as well as load the db
204 library as described above.
206 As a final example, let's say that you've downloaded ncurses from the net
207 and you've built it in a directory named ncurses which is at the same
208 level in the filesystem hierarchy as nvi. You would enter something like:
210 env ADDCPPFLAGS="-I../../ncurses/include" \
211 ADDLIBS="-L../../ncurses/libraries" configure
213 to cause nvi to look for the curses include files and the curses library
214 in the ncurses environment.
217 Make sure that you prepend -L to any library directory names, and
218 that you prepend -I to any include file directory names! Also,
219 make sure that you quote the paths as shown above, i.e. with
220 single or double quotes around the values you're specifying for
221 ADDCPPFLAGS and ADDLIBS.
224 You should NOT need to add any libraries or include files to load
225 the Perl5 interpreter. The configure script will obtain that
226 information directly from the Perl5 program. This means that the
227 configure script must be able to find perl in its path. It looks
228 for "perl5" first, and then "perl". If you're building a Perl
229 interpreter and neither is found, it's a fatal error.
232 You do not need to specify additional libraries to load Tk/Tcl,
233 Perl or curses, as the nvi configuration script adds the
234 appropriate libraries to the load line whenever you specify
235 --enable-tknvi or other Perl or Tk/Tcl related option, or build
236 the Tk/Tcl or curses version of nvi. The library names that are
237 automatically loaded are as follows:
240 for Tk/Tcl: -ltk -ltcl -lm
243 In addition, the configure script loads:
245 ... the X libraries when loading the Tk/Tcl libraries,
248 ... the -ltermcap or -ltermlib libraries when loading
249 any curses library, if they exist.
252 The env command is available on most systems, and simply sets one
253 or more environment variables before running a command. If the
254 env command is not available to you, you can set the environment
255 variables in your shell before running configure. For example,
256 in sh or ksh, you could do:
258 ADDLIBS="-L/a/b -L/e/f -ldb" configure
260 and in csh or tcsh, you could do:
262 setenv ADDLIBS "-L/a/b -L/e/f -ldb"
265 See your shell manual page for further information.
269 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
271 Nvi installs the following files into the following locations, with
272 the following default values:
274 Variables: Default value:
276 exec_prefix $(prefix)
278 datadir $(prefix)/share
281 File(s): Default location
282 ----------------------------------------
284 vi.1 $(mandir)/man1/vi.1
285 vi.0 $(mandir)/cat1/vi.0
286 Perl scripts $(datadir)/vi/perl/
287 Tcl scripts $(datadir)/vi/tcl/
288 Message Catalogs $(datadir)/vi/catalog/
291 There are two hard links to the vi program, named ex and view.
292 Similarly, there are two hard links to the unformatted vi manual
293 page, named ex.1 and view.1, and two hard links to the formatted
294 manual page, named ex.0 and view.0. These links are created when
295 the program and man pages are installed.
297 If you want to install vi, ex, view and the man pages as nvi, nex,
298 nview, use the configure option --program-prefix=n. Other, more
299 complex transformations are possible -- use configure --help to
302 To move the entire installation tree somewhere besides /usr/local,
303 change the value of both "exec_prefix" and "prefix". To move the
304 binaries to a different place, change the value of "bindir".
305 Similarly, to put the datafiles (the message catalogs, Perl and
306 Tcl scripts) or the man pages in a different place, change the
307 value of "datadir" or "mandir". These values can be changed as
308 part of configuration:
310 configure --exec_prefix=/usr/contrib --prefix=/usr/share
312 or when doing the install itself:
314 make exec_prefix=/usr/contrib prefix=/usr/contrib install
316 The datafile directory (e.g., /usr/local/share/vi by default) is
317 completely removed and then recreated as part of the installation
321 NVI AND THE CURSES LIBRARY
322 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
324 The major portability problem for nvi is selecting a curses library.
325 Unfortunately, it is common to find broken versions of curses -- the
326 original System V curses was broken, resulting in all vendors whose
327 implementations are derived from System V having broken implementations
330 For this reason, BY DEFAULT, nvi uses the stripped-down curses library
331 that's included in its distribution. Of course, it would be preferable
332 to use the vendor's curses library, or one of the newer implementations
333 of curses, e.g., ncurses.
335 To use the vendor's curses library, specify the:
339 argument to the configure command. If you use the vendor's or other
340 curses library, and you see any of the following symptoms:
342 + Core dumps in curses routines.
343 + Missing routines when compiling.
344 + Repainting the wrong characters on the screen.
345 + Displaying inverse video in the wrong places.
346 + Failure to reset your terminal to the correct modes on exit.
348 you have a broken curses implementation, and you should reconfigure nvi
349 to use another curses library or the curses library provided with nvi.
351 There are two alternative sources for curses libraries:
353 #1: Compile the 4BSD curses library from any of the recent BSD
354 releases: FreeBSD, NetBSD or 4.4BSD-Lite release 2. These
355 libraries should be able to support nvi.
357 #2: Retrieve and build the ncurses library. This library is not
358 recommended unreservedly, at least for now, for two reasons.
359 First, it can't be built on any system where the compiler
360 doesn't support function prototypes. Second, it currently has
361 a few bugs in its support for nvi. It mostly works, but it's
362 still not quite right.
364 One final note. If you see the following symptoms:
366 + Line-by-line screen repainting instead of scrolling.
368 it usually means that your termcap or terminfo information is insufficient