1 # $Id: README,v 8.29 2001/05/13 20:52:36 skimo Exp $ (Berkeley) $Date: 2001/05/13 20:52:36 $
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-re DON'T use the nvi-provided RE routines.
51 --enable-debug Build a debugging version.
52 --enable-perlinterp Include a Perl interpreter in vi.
53 --enable-tclinterp Include a Tk/Tcl interpreter in vi.
54 --enable-gtk Build a gtk front-end.
55 --enable-motif Build a motif front-end.
56 --enable-threads Turn on thread support.
57 --enable-widechar Build a wide character aware vi (experimental).
58 --with-curses=DIR Path to curses installation.
59 --with-db3=db3prefix Path to db3 installation.
60 --enable-dynamic-loading Load DB 3 dynamically.
63 By default, nvi loads its own versions of the POSIX 1003.2 Regular
64 Expression routines (which are Henry Spencer's implementation).
65 If your C library contains an implementation of the POSIX 1003.2
66 RE routines (note, this is NOT the same as the historic UNIX RE
67 routines), and you want to use them instead, enter:
71 as an argument to configure, and the RE routines will be taken
72 from whatever libraries you load. Please ensure that your RE
73 routines implement Henry Spencer's extensions for doing vi-style
77 If you want to build nvi with no optimization (i.e. without -O
78 as a compiler flag), with -g as a compiler flag, and with DEBUG
79 defined during compilation, enter:
83 as an argument to configure.
86 If you have the Perl 5 libraries and you want to compile in the
87 Perl interpreter, enter:
91 as an argument to configure. (Note: this is NOT possible with
92 Perl 4, or even with Perl 5 versions earlier than 5.002.)
95 If you have the Tk/Tcl libraries and you want to compile in the
96 Tcl/Tk interpreter, enter:
100 as an argument to configure. If your Tk/Tcl include files and
101 libraries aren't in the standard library and include locations,
102 see the next section of this README file for more information.
105 If you have the Gtk libraries and you want to build the Gtk
106 nvi front-end, enter:
110 as an argument to configure. If your Gtk include files and
111 libraries aren't in the standard library and include locations,
112 see the next section of this README file for more information.
113 See also the enable-threads option.
116 If you have the Motif libraries and you want to build the Motif
117 nvi front-end, enter:
121 as an argument to configure. If your Motif 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 want to be able to use multiple windows in the Gtk
127 front-end, you should specify this option.
130 Specifies the path where curses is installed.
133 Specifies the path where DB3 is installed.
134 See README.DB3 for more information about DB3.
136 enable-dynamic-loading:
137 Dynamically load DB3 library.
138 See README.DB3 for more information about DB3.
141 Enables support for wide characters.
142 Note that this is still rather experimental.
144 If you try this out on Solaris, you will want to point nvi
145 to the curses in /usr/xpg4/ which is CSI compliant.
148 ADDING OR CHANGING COMPILERS, OR COMPILE OR LOAD LINE FLAGS
149 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
151 If you want to use a specific compiler, specify the CC environment
152 variable before running configure. For example:
156 Using anything other than the native compiler will almost certainly
157 mean that you'll want to check the compile and load line flags, too.
159 If you want to specify additional load line flags, specify the ADDLDFLAGS
160 environment variable before running configure. For example:
162 env ADDLDFLAGS="-Q" configure
164 would specify the -Q flag in the load line when the nvi programs are
167 If you don't want configure to use the default load line flags for the
168 system, specify the LDFLAGS environment variable before running configure.
171 env LDFLAGS="-32" configure
173 will cause configure to set the load line flags to "-32", and not set
174 them based on the current system.
176 If you want to specify additional compile line flags, specify the
177 ADDCPPFLAGS environment variable before running configure. For example:
179 env ADDCPPFLAGS="-I../foo" configure
181 would cause the compiler to be passed the -I../foo flag when compiling
182 test programs during configuration as well as when building nvi object
185 If you don't want configure to use the default compile line flags for the
186 system, specify the CPPFLAGS environment variable before running configure.
189 env CPPFLAGS="-I.." configure
191 will cause configure to use "-I.." as the compile line flags instead of
195 ADDING LIBRARIES AND INCLUDE FILES
196 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
198 If the Tk/Tcl or any other include files or libraries are in non-standard
199 places on your system, you will need to specify the directory path where
202 If you want to specify additional library paths, set the ADDLIBS environment
203 variable before running configure. For example:
205 env ADDLIBS="-L/a/b -L/e/f -ldb" configure
207 would specify two additional directories to search for libraries, /a/b
208 and /e/f, and one additional library to load, "db".
210 If you want to specify additional include paths, specify the ADDCPPFLAGS
211 environment variable before running configure. For example:
213 env ADDCPPFLAGS="-I/usr/local/include" LIBS="-ldb" configure
215 would search /usr/local/include for include files, as well as load the db
216 library as described above.
218 As a final example, let's say that you've downloaded ncurses from the net
219 and you've built it in a directory named ncurses which is at the same
220 level in the filesystem hierarchy as nvi. You would enter something like:
222 env ADDCPPFLAGS="-I../../ncurses/include" \
223 ADDLIBS="-L../../ncurses/libraries" configure
225 to cause nvi to look for the curses include files and the curses library
226 in the ncurses environment.
229 Make sure that you prepend -L to any library directory names, and
230 that you prepend -I to any include file directory names! Also,
231 make sure that you quote the paths as shown above, i.e. with
232 single or double quotes around the values you're specifying for
233 ADDCPPFLAGS and ADDLIBS.
236 You should NOT need to add any libraries or include files to load
237 the Perl5 interpreter. The configure script will obtain that
238 information directly from the Perl5 program. This means that the
239 configure script must be able to find perl in its path. It looks
240 for "perl5" first, and then "perl". If you're building a Perl
241 interpreter and neither is found, it's a fatal error.
244 You do not need to specify additional libraries to load Tk/Tcl,
245 Perl or curses, as the nvi configuration script adds the
246 appropriate libraries to the load line whenever you specify
247 --enable-tknvi or other Perl or Tk/Tcl related option, or build
248 the Tk/Tcl or curses version of nvi. The library names that are
249 automatically loaded are as follows:
252 for Tk/Tcl: -ltk -ltcl -lm
255 In addition, the configure script loads:
257 ... the X libraries when loading the Tk/Tcl libraries,
260 ... the -ltermcap or -ltermlib libraries when loading
261 any curses library, if they exist.
264 The env command is available on most systems, and simply sets one
265 or more environment variables before running a command. If the
266 env command is not available to you, you can set the environment
267 variables in your shell before running configure. For example,
268 in sh or ksh, you could do:
270 ADDLIBS="-L/a/b -L/e/f -ldb" configure
272 and in csh or tcsh, you could do:
274 setenv ADDLIBS "-L/a/b -L/e/f -ldb"
277 See your shell manual page for further information.
281 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
283 Nvi installs the following files into the following locations, with
284 the following default values:
286 Variables: Default value:
288 exec_prefix $(prefix)
290 datadir $(prefix)/share
293 File(s): Default location
294 ----------------------------------------
296 vi.1 $(mandir)/man1/vi.1
297 vi.0 $(mandir)/cat1/vi.0
298 Perl scripts $(datadir)/vi/perl/
299 Tcl scripts $(datadir)/vi/tcl/
300 Message Catalogs $(datadir)/vi/catalog/
303 There are two hard links to the vi program, named ex and view.
304 Similarly, there are two hard links to the unformatted vi manual
305 page, named ex.1 and view.1, and two hard links to the formatted
306 manual page, named ex.0 and view.0. These links are created when
307 the program and man pages are installed.
309 If you want to install vi, ex, view and the man pages as nvi, nex,
310 nview, use the configure option --program-prefix=n. Other, more
311 complex transformations are possible -- use configure --help to
314 To move the entire installation tree somewhere besides /usr/local,
315 change the value of both "exec_prefix" and "prefix". To move the
316 binaries to a different place, change the value of "bindir".
317 Similarly, to put the datafiles (the message catalogs, Perl and
318 Tcl scripts) or the man pages in a different place, change the
319 value of "datadir" or "mandir". These values can be changed as
320 part of configuration:
322 configure --exec_prefix=/usr/contrib --prefix=/usr/share
324 or when doing the install itself:
326 make exec_prefix=/usr/contrib prefix=/usr/contrib install
328 The datafile directory (e.g., /usr/local/share/vi by default) is
329 completely removed and then recreated as part of the installation
333 NVI AND THE CURSES LIBRARY
334 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
336 The major portability problem for nvi is selecting a curses library.
337 Unfortunately, it is common to find broken versions of curses -- the
338 original System V curses was broken, resulting in all vendors whose
339 implementations are derived from System V having broken implementations
342 If you use the vendor's or other curses library, and you see any of the
345 + Core dumps in curses routines.
346 + Missing routines when compiling.
347 + Repainting the wrong characters on the screen.
348 + Displaying inverse video in the wrong places.
349 + Failure to reset your terminal to the correct modes on exit.
351 you have a broken curses implementation, and you should reconfigure nvi
352 to use another curses library.
354 An alternative for your vendor's curses is ncurses, available from
355 ftp://ftp.gnu.org/pub/gnu/ncurses/
357 One final note. If you see the following symptoms:
359 + Line-by-line screen repainting instead of scrolling.
361 it usually means that your termcap or terminfo information is insufficient