home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
vile-src.zip
/
vile-8.1
/
doc
/
config.doc
next >
Wrap
Text File
|
1997-12-17
|
12KB
|
311 lines
README.CFG
----------
This file describes the steps which are needed to configure and make either
vile or xvile. See the file README for a blurb on what (x)vile is and how
great it is :-). The file INSTALL contains generic information on the
process of configuring and building programs which (more or less) conform
to the GNU coding standards. You might want to consult that document for
more information.
Building vile
-------------
To build vile, enter the following command from your shell:
./configure; make
If you'd like to examine makefile and config.h prior to making, split these
steps up as follows:
./configure
make
If you are unfortunate enough to be running on a platform in which some
part of the above process does not work perfectly, you might well want to
modify makefile to add references to obscure libraries or non-standard
library locations.
[ At least one version of bash running on Linux (and perhaps other)
systems will cause the configure script to produce invalid results.
Specifically, if you're running version 1.14.3 of bash consider
upgrading to a newer one. ]
Modifying makefile is not recommended because your changes will be lost
should you run configure again. Many configuration options can be
set externally to the configure script or the makefile. For instance,
if you'd like to change some of the flags passed to the C compiler, try
doing it like this:
make CFLAGS=-O2
Or, this can be done when running the configure script instead -- try:
CFLAGS=-O2 ./configure (sh, ksh, bash)
or:
(setenv CFLAGS -O2 ; ./configure) (csh)
If you need to suppress your optimizer (which is invoked as -O by default),
because it's known to be buggy, use CFLAGS=" ". [ One combination
thought to be buggy is AIX 3.2.5 with gcc 2.6.0. ]
The configure script will favor using gcc on your system if available. This
is usually fine, but if gcc was not installed correctly (or your environment
isn't quite right), it can be disastrous. You can override the choice
of compiler with:
CC=cc ./configure (sh, ksh, bash)
or:
(setenv CC cc ; ./configure) (csh)
Likewise, extra link libraries can be added by setting them in LIBS before
running configure.
Screen Types
------------
Vile is configured and built with a terminal driver. At this time, only
one driver is built with vile at a time. Some other editors attempt to
combine more than one driver in the default configuration, making the
resulting program much larger and slower. We will ultimately modify vile
to support multiple drivers, but the default configuration will be the
smallest and fastest.
Use the configure script's "--with-screen" option to specify the driver
type, e.g.,
./configure --with-screen=tcap
The default configuration for vile uses termcap (or terminfo, depending
what your system has available). The configuration script tests several
possibilities. Your system may have more than one library to link against,
e.g., on Linux you may have both termcap and ncurses (a terminfo-based
system). If you wish to use color, you are generally better off using
terminfo, since termcap descriptions usually are limited to a fixed size,
and some features are omitted. To tell the configure script to link
against the ncurses library (but still using the basic termcap/terminfo
driver), type
./configure --with-screen=ncurses
A much less capable driver uses builtin ANSI escape sequences:
./configure --with-screen=ansi
Building xvile
--------------
You must decide which version of xvile you want to build. To a certain
degree this decision may be forced upon you by which libraries you have
on your machine. There are three different versions you can build.
1) X toolkit version: This version uses only the X toolkit to implement
scrollbars and the window resize grips (meaning _vile_ windows, not X
windows). As a consequence, it should only require the X toolkit library
(-lXt) and the Xlib library (-lX11). (Don't worry if you don't know what
these are or where these are; the configuration script will probably be
able to find them.) The scrollbars in this version look much like those
found in a standard xterm. We recommend that you try this version out
first as it is superior in some respects to the other versions which use
fancy widget sets. To configure this version, enter the following command:
./configure --with-screen=x11
A minor variation using the Athena widgets supports menus:
./configure --with-screen=Xaw
Two other variations on the Athena widgets are provided:
./configure --with-Xaw3d
to link with Xaw 3d library
./configure --with-neXtaw
to link with neXT Athena library. There's little functional difference
between the three versions of Athena libraries, they provide different
appearance. You can also configure with the corresponding scrollbars from
the Athena library (though we are not as satisfied with their performance,
particularly with resizing):
./configure --with-Xaw-scrollbars
to use Xaw scrollbars rather than our own (applies to all variations of
Athena library). You can also use Kevin's dragging/scrolling logic with
the Athena library:
./configure --with-drag-extension
2) Motif version: This version uses the Motif widget set to implement
the scrollbars and (vile) window resize pane. To configure the Motif
version, enter one of the following commands (several variations are
recognized for each screen value to simplify integration with other
scripts):
./configure --with-screen=motif
./configure --with-screen=Xm
3) OpenLook version: Uses the OpenLook widgets to implement scrollbars. Since
OpenLook lacks a pane widget, resizing (vile) windows is pretty cheesy. Still,
if you are running olwm or olvwm, you might well want to run this version
so that xvile will look the same as your other applications.
./configure --with-screen=openlook
./configure --with-screen=Xol
After configuration, you may look at the makefile or config.h if you wish. You
can finish making xvile by entering the following command:
make
On some systems it seems to be sometimes necessary (?) to have X_LIBS set
to -static prior running configure, i.e, use either:
X_LIBS=-static ./configure --with-screen=openlook
for sh, ksh, and bash. Or:
(setenv X_LIBS -static ; ./configure --with-screen=openlook)
for csh and tcsh.
Installing (x)vile
------------------
Installation of (x)vile is simple. Obtain the appropriate privileges (become
superuser if you have to), and enter the following command:
make install
If you have ever installed an older version of vile, you should probably
check to be sure the old help files are gone. They used to go to a
different place (by default) than they do now. It can be most confusing
to use an older version of the help file with a newer version of the
program, and unfortunately, older help files didn't have version numbers.
We realize that not everyone has superuser privileges on the machines on
which they wish to build (x)vile. By default, the executables will be
installed in /usr/local/bin. vile.hlp will be installed in /usr/local/lib.
vile.1 (the manual page) will be installed in /usr/local/man/man1. If you
lack superuser access or write access to /usr/local, you will want to
change the installation location. You may do so by using the --prefix
option to "configure". Suppose you wish to have xvile installed in
$HOME/bin (your home bin directory). You would issue the following
configuration command:
./configure --with-screen=x11 --prefix=$HOME
The file INSTALL has more information on installation and on the --prefix
option to "configure". (If you don't feel like rebuilding (likely), you
can also edit the makefile and change the "prefix", "bindir", or "libdir"
definitions -- remember that your changes will be lost next time you run
configure.
Building in a separate directory
--------------------------------
If you are building (x)vile for several machines or want to perhaps
simultaneously build and try out the various versions of xvile, you will
probably want to configure (x)vile to build in a directory different from
where the source resides. This requires that you have make program which
correctly uses the VPATH variable. GNU make does this well, others may
or may not.
Suppose that the source resides in vile-src. At the same level as
vile-src, you might perhaps create a directory called vile-x11-sunos to
indicate that you are building xvile on a platform running sunos. You
would then cd into this directory and issue the following configuration
command:
../vile-src/configure --with-screen=x11
Another directory at the same level as vile-src might be named vile-sunos
to indicate that you are building vile on a platform running sunos. After
you cd into this directory, you'd then issue the following command to
configure ordinary vile.
../vile-src/configure
The "make" step in each case is the same as described above; you simply
issue the command:
make
to finish making (x)vile.
This process is described in more formally in the INSTALL document. As
described there, you will need to use a version of "make" which supports
the VPATH variable. And it must support it _correctly_. Again, GNU make
does this. A lot of older "make"s don't.
Other Compile-Time Options
--------------------------
Aside from the screen type, most functionality in vile is controlled by the
"OPT_" #ifdef's in the estruct.h file. Some of the more useful ones (or
those that require manipulating the makefile) are also provided as configure
options:
--with-exec-macros=N specify count of numbered macros
--with-perl enable use of Perl as an extension language
Testing/Development Options
---------------------------
Several other options appear in the configure script's "--help" message.
They are used to support testing and development, by building various
debug versions of vile. These include:
--disable-echo test: display "compiling" commands (default: on)
--disable-extensions test: build only core functions (default: on)
--disable-shell test: disable shell/external commands (default: on)
--with-dbmalloc test: use Conor Cahill's dbmalloc library
--with-dmalloc test: use Gray Watson's dmalloc library
--with-no-leaks test: free permanent memory, analyze leaks
--with-trace test: turn on debug-tracing
--with-warnings test: turn on GCC compiler warnings
The dbmalloc and dmalloc libraries are similar, checking for memory leaks
and related malloc/free problems. Both have limitations, so we use both,
as well as other tools such as Purify and ElectricFence, according to the
problem.
The --with-no-leaks option compiles in code that frees all of the
permanently allocated memory on exit. This greatly simplifies the task of
analyzing memory leaks.
The --with-trace option turns on debug traces that go to the Trace.out
file. Since vile is a fullscreen program, it is not useful to write
messages to the screen. (The OPT_RAMSIZE option is an exception; you may
be amused by it).
The --with-warnings option applies mostly to compiles with GCC, since it is
available across several platforms. We build with all available compilers, but
their warnings options are not consistent.
[ However, --with-warnings also turns on checks for missing prototypes,
assuming that an ANSI or Posix prototype is better than none (e.g., for
SunOS 4.x). However, this may result in a config.h too long for your
sed program to handle. GNU sed works properly. An alternative is the
td_config utility bundled with Tom's directory editor. ]
Because the echoed commands in the makefile are long, the
--disable-echo option is provided to shorten the commands, making it easy to
see the warnings.
The --disable-extensions and --disable-shell options are for testing.
Disabling extensions produces a smaller program, essentially the core of
vile (no macros), which is a workable editor. You may wish to build vile
without shell support, but perhaps not (ymmv).
------------------------
$Header: /usr/build/vile/vile/doc/RCS/config.doc,v 1.1 1997/12/17 11:16:54 tom Exp $
------------------------