xref: /freebsd/contrib/less/INSTALL (revision a5f0fb15)
1a5f0fb15SPaul SaabThis file contains generic instructions on how to build and
2a5f0fb15SPaul Saabinstall software using autoconf. For specific instructions
3a5f0fb15SPaul Saabon how to build "less", see the README or README.VER file.
4a5f0fb15SPaul Saab
5a5f0fb15SPaul Saab
6a5f0fb15SPaul SaabBasic Installation
7a5f0fb15SPaul Saab==================
8a5f0fb15SPaul Saab
9a5f0fb15SPaul Saab   These are generic installation instructions.
10a5f0fb15SPaul Saab
11a5f0fb15SPaul Saab   The `configure' shell script attempts to guess correct values for
12a5f0fb15SPaul Saabvarious system-dependent variables used during compilation.  It uses
13a5f0fb15SPaul Saabthose values to create a `Makefile' in each directory of the package.
14a5f0fb15SPaul SaabIt may also create one or more `.h' files containing system-dependent
15a5f0fb15SPaul Saabdefinitions.  Finally, it creates a shell script `config.status' that
16a5f0fb15SPaul Saabyou can run in the future to recreate the current configuration, a file
17a5f0fb15SPaul Saab`config.cache' that saves the results of its tests to speed up
18a5f0fb15SPaul Saabreconfiguring, and a file `config.log' containing compiler output
19a5f0fb15SPaul Saab(useful mainly for debugging `configure').
20a5f0fb15SPaul Saab
21a5f0fb15SPaul Saab   If you need to do unusual things to compile the package, please try
22a5f0fb15SPaul Saabto figure out how `configure' could check whether to do them, and mail
23a5f0fb15SPaul Saabdiffs or instructions to the address given in the `README' so they can
24a5f0fb15SPaul Saabbe considered for the next release.  If at some point `config.cache'
25a5f0fb15SPaul Saabcontains results you don't want to keep, you may remove or edit it.
26a5f0fb15SPaul Saab
27a5f0fb15SPaul Saab   The file `configure.ac' is used to create `configure' by a program
28a5f0fb15SPaul Saabcalled `autoconf'.  You only need `configure.ac' if you want to change
29a5f0fb15SPaul Saabit or regenerate `configure' using a newer version of `autoconf'.
30a5f0fb15SPaul Saab
31a5f0fb15SPaul SaabThe simplest way to compile this package is:
32a5f0fb15SPaul Saab
33a5f0fb15SPaul Saab  1. `cd' to the directory containing the package's source code and type
34a5f0fb15SPaul Saab     `./configure' to configure the package for your system.  If you're
35a5f0fb15SPaul Saab     using `csh' on an old version of System V, you might need to type
36a5f0fb15SPaul Saab     `sh ./configure' instead to prevent `csh' from trying to execute
37a5f0fb15SPaul Saab     `configure' itself.
38a5f0fb15SPaul Saab
39a5f0fb15SPaul Saab     Running `configure' takes awhile.  While running, it prints some
40a5f0fb15SPaul Saab     messages telling which features it is checking for.
41a5f0fb15SPaul Saab
42a5f0fb15SPaul Saab  2. Type `make' to compile the package.
43a5f0fb15SPaul Saab
44a5f0fb15SPaul Saab  3. Optionally, type `make check' to run any self-tests that come with
45a5f0fb15SPaul Saab     the package.
46a5f0fb15SPaul Saab
47a5f0fb15SPaul Saab  4. Type `make install' to install the programs and any data files and
48a5f0fb15SPaul Saab     documentation.
49a5f0fb15SPaul Saab
50a5f0fb15SPaul Saab  5. You can remove the program binaries and object files from the
51a5f0fb15SPaul Saab     source code directory by typing `make clean'.  To also remove the
52a5f0fb15SPaul Saab     files that `configure' created (so you can compile the package for
53a5f0fb15SPaul Saab     a different kind of computer), type `make distclean'.  There is
54a5f0fb15SPaul Saab     also a `make maintainer-clean' target, but that is intended mainly
55a5f0fb15SPaul Saab     for the package's developers.  If you use it, you may have to get
56a5f0fb15SPaul Saab     all sorts of other programs in order to regenerate files that came
57a5f0fb15SPaul Saab     with the distribution.
58a5f0fb15SPaul Saab
59a5f0fb15SPaul SaabCompilers and Options
60a5f0fb15SPaul Saab=====================
61a5f0fb15SPaul Saab
62a5f0fb15SPaul Saab   Some systems require unusual options for compilation or linking that
63a5f0fb15SPaul Saabthe `configure' script does not know about.  You can give `configure'
64a5f0fb15SPaul Saabinitial values for variables by setting them in the environment.  Using
65a5f0fb15SPaul Saaba Bourne-compatible shell, you can do that on the command line like
66a5f0fb15SPaul Saabthis:
67a5f0fb15SPaul Saab     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
68a5f0fb15SPaul Saab
69a5f0fb15SPaul SaabOr on systems that have the `env' program, you can do it like this:
70a5f0fb15SPaul Saab     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
71a5f0fb15SPaul Saab
72a5f0fb15SPaul SaabCompiling For Multiple Architectures
73a5f0fb15SPaul Saab====================================
74a5f0fb15SPaul Saab
75a5f0fb15SPaul Saab   You can compile the package for more than one kind of computer at the
76a5f0fb15SPaul Saabsame time, by placing the object files for each architecture in their
77a5f0fb15SPaul Saabown directory.  To do this, you must use a version of `make' that
78a5f0fb15SPaul Saabsupports the `VPATH' variable, such as GNU `make'.  `cd' to the
79a5f0fb15SPaul Saabdirectory where you want the object files and executables to go and run
80a5f0fb15SPaul Saabthe `configure' script.  `configure' automatically checks for the
81a5f0fb15SPaul Saabsource code in the directory that `configure' is in and in `..'.
82a5f0fb15SPaul Saab
83a5f0fb15SPaul Saab   If you have to use a `make' that does not supports the `VPATH'
84a5f0fb15SPaul Saabvariable, you have to compile the package for one architecture at a time
85a5f0fb15SPaul Saabin the source code directory.  After you have installed the package for
86a5f0fb15SPaul Saabone architecture, use `make distclean' before reconfiguring for another
87a5f0fb15SPaul Saabarchitecture.
88a5f0fb15SPaul Saab
89a5f0fb15SPaul SaabInstallation Names
90a5f0fb15SPaul Saab==================
91a5f0fb15SPaul Saab
92a5f0fb15SPaul Saab   By default, `make install' will install the package's files in
93a5f0fb15SPaul Saab`/usr/local/bin', `/usr/local/man', etc.  You can specify an
94a5f0fb15SPaul Saabinstallation prefix other than `/usr/local' by giving `configure' the
95a5f0fb15SPaul Saaboption `--prefix=PATH'.
96a5f0fb15SPaul Saab
97a5f0fb15SPaul Saab   You can specify separate installation prefixes for
98a5f0fb15SPaul Saabarchitecture-specific files and architecture-independent files.  If you
99a5f0fb15SPaul Saabgive `configure' the option `--exec-prefix=PATH', the package will use
100a5f0fb15SPaul SaabPATH as the prefix for installing programs and libraries.
101a5f0fb15SPaul SaabDocumentation and other data files will still use the regular prefix.
102a5f0fb15SPaul Saab
103a5f0fb15SPaul Saab   In addition, if you use an unusual directory layout you can give
104a5f0fb15SPaul Saaboptions like `--bindir=PATH' to specify different values for particular
105a5f0fb15SPaul Saabkinds of files.  Run `configure --help' for a list of the directories
106a5f0fb15SPaul Saabyou can set and what kinds of files go in them.
107a5f0fb15SPaul Saab
108a5f0fb15SPaul Saab   If the package supports it, you can cause programs to be installed
109a5f0fb15SPaul Saabwith an extra prefix or suffix on their names by giving `configure' the
110a5f0fb15SPaul Saaboption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
111a5f0fb15SPaul Saab
112a5f0fb15SPaul SaabOptional Features
113a5f0fb15SPaul Saab=================
114a5f0fb15SPaul Saab
115a5f0fb15SPaul Saab   Some packages pay attention to `--enable-FEATURE' options to
116a5f0fb15SPaul Saab`configure', where FEATURE indicates an optional part of the package.
117a5f0fb15SPaul SaabThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
118a5f0fb15SPaul Saabis something like `gnu-as' or `x' (for the X Window System).  The
119a5f0fb15SPaul Saab`README' should mention any `--enable-' and `--with-' options that the
120a5f0fb15SPaul Saabpackage recognizes.
121a5f0fb15SPaul Saab
122a5f0fb15SPaul Saab   For packages that use the X Window System, `configure' can usually
123a5f0fb15SPaul Saabfind the X include and library files automatically, but if it doesn't,
124a5f0fb15SPaul Saabyou can use the `configure' options `--x-includes=DIR' and
125a5f0fb15SPaul Saab`--x-libraries=DIR' to specify their locations.
126a5f0fb15SPaul Saab
127a5f0fb15SPaul SaabSpecifying the System Type
128a5f0fb15SPaul Saab==========================
129a5f0fb15SPaul Saab
130a5f0fb15SPaul Saab   There may be some features `configure' can not figure out
131a5f0fb15SPaul Saabautomatically, but needs to determine by the type of host the package
132a5f0fb15SPaul Saabwill run on.  Usually `configure' can figure that out, but if it prints
133a5f0fb15SPaul Saaba message saying it can not guess the host type, give it the
134a5f0fb15SPaul Saab`--host=TYPE' option.  TYPE can either be a short name for the system
135a5f0fb15SPaul Saabtype, such as `sun4', or a canonical name with three fields:
136a5f0fb15SPaul Saab     CPU-COMPANY-SYSTEM
137a5f0fb15SPaul Saab
138a5f0fb15SPaul SaabSee the file `config.sub' for the possible values of each field.  If
139a5f0fb15SPaul Saab`config.sub' isn't included in this package, then this package doesn't
140a5f0fb15SPaul Saabneed to know the host type.
141a5f0fb15SPaul Saab
142a5f0fb15SPaul Saab   If you are building compiler tools for cross-compiling, you can also
143a5f0fb15SPaul Saabuse the `--target=TYPE' option to select the type of system they will
144a5f0fb15SPaul Saabproduce code for and the `--build=TYPE' option to select the type of
145a5f0fb15SPaul Saabsystem on which you are compiling the package.
146a5f0fb15SPaul Saab
147a5f0fb15SPaul SaabSharing Defaults
148a5f0fb15SPaul Saab================
149a5f0fb15SPaul Saab
150a5f0fb15SPaul Saab   If you want to set default values for `configure' scripts to share,
151a5f0fb15SPaul Saabyou can create a site shell script called `config.site' that gives
152a5f0fb15SPaul Saabdefault values for variables like `CC', `cache_file', and `prefix'.
153a5f0fb15SPaul Saab`configure' looks for `PREFIX/share/config.site' if it exists, then
154a5f0fb15SPaul Saab`PREFIX/etc/config.site' if it exists.  Or, you can set the
155a5f0fb15SPaul Saab`CONFIG_SITE' environment variable to the location of the site script.
156a5f0fb15SPaul SaabA warning: not all `configure' scripts look for a site script.
157a5f0fb15SPaul Saab
158a5f0fb15SPaul SaabOperation Controls
159a5f0fb15SPaul Saab==================
160a5f0fb15SPaul Saab
161a5f0fb15SPaul Saab   `configure' recognizes the following options to control how it
162a5f0fb15SPaul Saaboperates.
163a5f0fb15SPaul Saab
164a5f0fb15SPaul Saab`--cache-file=FILE'
165a5f0fb15SPaul Saab     Use and save the results of the tests in FILE instead of
166a5f0fb15SPaul Saab     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
167a5f0fb15SPaul Saab     debugging `configure'.
168a5f0fb15SPaul Saab
169a5f0fb15SPaul Saab`--help'
170a5f0fb15SPaul Saab     Print a summary of the options to `configure', and exit.
171a5f0fb15SPaul Saab
172a5f0fb15SPaul Saab`--quiet'
173a5f0fb15SPaul Saab`--silent'
174a5f0fb15SPaul Saab`-q'
175a5f0fb15SPaul Saab     Do not print messages saying which checks are being made.
176a5f0fb15SPaul Saab
177a5f0fb15SPaul Saab`--srcdir=DIR'
178a5f0fb15SPaul Saab     Look for the package's source code in directory DIR.  Usually
179a5f0fb15SPaul Saab     `configure' can determine that directory automatically.
180a5f0fb15SPaul Saab
181a5f0fb15SPaul Saab`--version'
182a5f0fb15SPaul Saab     Print the version of Autoconf used to generate the `configure'
183a5f0fb15SPaul Saab     script, and exit.
184a5f0fb15SPaul Saab
185a5f0fb15SPaul Saab`configure' also accepts some other, not widely useful, options.
186a5f0fb15SPaul Saab
187