xref: /dragonfly/contrib/cryptsetup/INSTALL (revision 86d7f5d3)
1*86d7f5d3SJohn MarinoCopyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
2*86d7f5d3SJohn MarinoFoundation, Inc.
3*86d7f5d3SJohn Marino
4*86d7f5d3SJohn Marino   This file is free documentation; the Free Software Foundation gives
5*86d7f5d3SJohn Marinounlimited permission to copy, distribute and modify it.
6*86d7f5d3SJohn Marino
7*86d7f5d3SJohn MarinoBasic Installation
8*86d7f5d3SJohn Marino==================
9*86d7f5d3SJohn Marino
10*86d7f5d3SJohn Marino   These are generic installation instructions.
11*86d7f5d3SJohn Marino
12*86d7f5d3SJohn Marino   The `configure' shell script attempts to guess correct values for
13*86d7f5d3SJohn Marinovarious system-dependent variables used during compilation.  It uses
14*86d7f5d3SJohn Marinothose values to create a `Makefile' in each directory of the package.
15*86d7f5d3SJohn MarinoIt may also create one or more `.h' files containing system-dependent
16*86d7f5d3SJohn Marinodefinitions.  Finally, it creates a shell script `config.status' that
17*86d7f5d3SJohn Marinoyou can run in the future to recreate the current configuration, and a
18*86d7f5d3SJohn Marinofile `config.log' containing compiler output (useful mainly for
19*86d7f5d3SJohn Marinodebugging `configure').
20*86d7f5d3SJohn Marino
21*86d7f5d3SJohn Marino   It can also use an optional file (typically called `config.cache'
22*86d7f5d3SJohn Marinoand enabled with `--cache-file=config.cache' or simply `-C') that saves
23*86d7f5d3SJohn Marinothe results of its tests to speed up reconfiguring.  (Caching is
24*86d7f5d3SJohn Marinodisabled by default to prevent problems with accidental use of stale
25*86d7f5d3SJohn Marinocache files.)
26*86d7f5d3SJohn Marino
27*86d7f5d3SJohn Marino   If you need to do unusual things to compile the package, please try
28*86d7f5d3SJohn Marinoto figure out how `configure' could check whether to do them, and mail
29*86d7f5d3SJohn Marinodiffs or instructions to the address given in the `README' so they can
30*86d7f5d3SJohn Marinobe considered for the next release.  If you are using the cache, and at
31*86d7f5d3SJohn Marinosome point `config.cache' contains results you don't want to keep, you
32*86d7f5d3SJohn Marinomay remove or edit it.
33*86d7f5d3SJohn Marino
34*86d7f5d3SJohn Marino   The file `configure.ac' (or `configure.in') is used to create
35*86d7f5d3SJohn Marino`configure' by a program called `autoconf'.  You only need
36*86d7f5d3SJohn Marino`configure.ac' if you want to change it or regenerate `configure' using
37*86d7f5d3SJohn Marinoa newer version of `autoconf'.
38*86d7f5d3SJohn Marino
39*86d7f5d3SJohn MarinoThe simplest way to compile this package is:
40*86d7f5d3SJohn Marino
41*86d7f5d3SJohn Marino  1. `cd' to the directory containing the package's source code and type
42*86d7f5d3SJohn Marino     `./configure' to configure the package for your system.  If you're
43*86d7f5d3SJohn Marino     using `csh' on an old version of System V, you might need to type
44*86d7f5d3SJohn Marino     `sh ./configure' instead to prevent `csh' from trying to execute
45*86d7f5d3SJohn Marino     `configure' itself.
46*86d7f5d3SJohn Marino
47*86d7f5d3SJohn Marino     Running `configure' takes awhile.  While running, it prints some
48*86d7f5d3SJohn Marino     messages telling which features it is checking for.
49*86d7f5d3SJohn Marino
50*86d7f5d3SJohn Marino  2. Type `make' to compile the package.
51*86d7f5d3SJohn Marino
52*86d7f5d3SJohn Marino  3. Optionally, type `make check' to run any self-tests that come with
53*86d7f5d3SJohn Marino     the package.
54*86d7f5d3SJohn Marino
55*86d7f5d3SJohn Marino  4. Type `make install' to install the programs and any data files and
56*86d7f5d3SJohn Marino     documentation.
57*86d7f5d3SJohn Marino
58*86d7f5d3SJohn Marino  5. You can remove the program binaries and object files from the
59*86d7f5d3SJohn Marino     source code directory by typing `make clean'.  To also remove the
60*86d7f5d3SJohn Marino     files that `configure' created (so you can compile the package for
61*86d7f5d3SJohn Marino     a different kind of computer), type `make distclean'.  There is
62*86d7f5d3SJohn Marino     also a `make maintainer-clean' target, but that is intended mainly
63*86d7f5d3SJohn Marino     for the package's developers.  If you use it, you may have to get
64*86d7f5d3SJohn Marino     all sorts of other programs in order to regenerate files that came
65*86d7f5d3SJohn Marino     with the distribution.
66*86d7f5d3SJohn Marino
67*86d7f5d3SJohn MarinoCompilers and Options
68*86d7f5d3SJohn Marino=====================
69*86d7f5d3SJohn Marino
70*86d7f5d3SJohn Marino   Some systems require unusual options for compilation or linking that
71*86d7f5d3SJohn Marinothe `configure' script does not know about.  Run `./configure --help'
72*86d7f5d3SJohn Marinofor details on some of the pertinent environment variables.
73*86d7f5d3SJohn Marino
74*86d7f5d3SJohn Marino   You can give `configure' initial values for configuration parameters
75*86d7f5d3SJohn Marinoby setting variables in the command line or in the environment.  Here
76*86d7f5d3SJohn Marinois an example:
77*86d7f5d3SJohn Marino
78*86d7f5d3SJohn Marino     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
79*86d7f5d3SJohn Marino
80*86d7f5d3SJohn Marino   *Note Defining Variables::, for more details.
81*86d7f5d3SJohn Marino
82*86d7f5d3SJohn MarinoCompiling For Multiple Architectures
83*86d7f5d3SJohn Marino====================================
84*86d7f5d3SJohn Marino
85*86d7f5d3SJohn Marino   You can compile the package for more than one kind of computer at the
86*86d7f5d3SJohn Marinosame time, by placing the object files for each architecture in their
87*86d7f5d3SJohn Marinoown directory.  To do this, you must use a version of `make' that
88*86d7f5d3SJohn Marinosupports the `VPATH' variable, such as GNU `make'.  `cd' to the
89*86d7f5d3SJohn Marinodirectory where you want the object files and executables to go and run
90*86d7f5d3SJohn Marinothe `configure' script.  `configure' automatically checks for the
91*86d7f5d3SJohn Marinosource code in the directory that `configure' is in and in `..'.
92*86d7f5d3SJohn Marino
93*86d7f5d3SJohn Marino   If you have to use a `make' that does not support the `VPATH'
94*86d7f5d3SJohn Marinovariable, you have to compile the package for one architecture at a
95*86d7f5d3SJohn Marinotime in the source code directory.  After you have installed the
96*86d7f5d3SJohn Marinopackage for one architecture, use `make distclean' before reconfiguring
97*86d7f5d3SJohn Marinofor another architecture.
98*86d7f5d3SJohn Marino
99*86d7f5d3SJohn MarinoInstallation Names
100*86d7f5d3SJohn Marino==================
101*86d7f5d3SJohn Marino
102*86d7f5d3SJohn Marino   By default, `make install' will install the package's files in
103*86d7f5d3SJohn Marino`/usr/local/bin', `/usr/local/man', etc.  You can specify an
104*86d7f5d3SJohn Marinoinstallation prefix other than `/usr/local' by giving `configure' the
105*86d7f5d3SJohn Marinooption `--prefix=PATH'.
106*86d7f5d3SJohn Marino
107*86d7f5d3SJohn Marino   You can specify separate installation prefixes for
108*86d7f5d3SJohn Marinoarchitecture-specific files and architecture-independent files.  If you
109*86d7f5d3SJohn Marinogive `configure' the option `--exec-prefix=PATH', the package will use
110*86d7f5d3SJohn MarinoPATH as the prefix for installing programs and libraries.
111*86d7f5d3SJohn MarinoDocumentation and other data files will still use the regular prefix.
112*86d7f5d3SJohn Marino
113*86d7f5d3SJohn Marino   In addition, if you use an unusual directory layout you can give
114*86d7f5d3SJohn Marinooptions like `--bindir=PATH' to specify different values for particular
115*86d7f5d3SJohn Marinokinds of files.  Run `configure --help' for a list of the directories
116*86d7f5d3SJohn Marinoyou can set and what kinds of files go in them.
117*86d7f5d3SJohn Marino
118*86d7f5d3SJohn Marino   If the package supports it, you can cause programs to be installed
119*86d7f5d3SJohn Marinowith an extra prefix or suffix on their names by giving `configure' the
120*86d7f5d3SJohn Marinooption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
121*86d7f5d3SJohn Marino
122*86d7f5d3SJohn MarinoOptional Features
123*86d7f5d3SJohn Marino=================
124*86d7f5d3SJohn Marino
125*86d7f5d3SJohn Marino   Some packages pay attention to `--enable-FEATURE' options to
126*86d7f5d3SJohn Marino`configure', where FEATURE indicates an optional part of the package.
127*86d7f5d3SJohn MarinoThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
128*86d7f5d3SJohn Marinois something like `gnu-as' or `x' (for the X Window System).  The
129*86d7f5d3SJohn Marino`README' should mention any `--enable-' and `--with-' options that the
130*86d7f5d3SJohn Marinopackage recognizes.
131*86d7f5d3SJohn Marino
132*86d7f5d3SJohn Marino   For packages that use the X Window System, `configure' can usually
133*86d7f5d3SJohn Marinofind the X include and library files automatically, but if it doesn't,
134*86d7f5d3SJohn Marinoyou can use the `configure' options `--x-includes=DIR' and
135*86d7f5d3SJohn Marino`--x-libraries=DIR' to specify their locations.
136*86d7f5d3SJohn Marino
137*86d7f5d3SJohn MarinoSpecifying the System Type
138*86d7f5d3SJohn Marino==========================
139*86d7f5d3SJohn Marino
140*86d7f5d3SJohn Marino   There may be some features `configure' cannot figure out
141*86d7f5d3SJohn Marinoautomatically, but needs to determine by the type of machine the package
142*86d7f5d3SJohn Marinowill run on.  Usually, assuming the package is built to be run on the
143*86d7f5d3SJohn Marino_same_ architectures, `configure' can figure that out, but if it prints
144*86d7f5d3SJohn Marinoa message saying it cannot guess the machine type, give it the
145*86d7f5d3SJohn Marino`--build=TYPE' option.  TYPE can either be a short name for the system
146*86d7f5d3SJohn Marinotype, such as `sun4', or a canonical name which has the form:
147*86d7f5d3SJohn Marino
148*86d7f5d3SJohn Marino     CPU-COMPANY-SYSTEM
149*86d7f5d3SJohn Marino
150*86d7f5d3SJohn Marinowhere SYSTEM can have one of these forms:
151*86d7f5d3SJohn Marino
152*86d7f5d3SJohn Marino     OS KERNEL-OS
153*86d7f5d3SJohn Marino
154*86d7f5d3SJohn Marino   See the file `config.sub' for the possible values of each field.  If
155*86d7f5d3SJohn Marino`config.sub' isn't included in this package, then this package doesn't
156*86d7f5d3SJohn Marinoneed to know the machine type.
157*86d7f5d3SJohn Marino
158*86d7f5d3SJohn Marino   If you are _building_ compiler tools for cross-compiling, you should
159*86d7f5d3SJohn Marinouse the `--target=TYPE' option to select the type of system they will
160*86d7f5d3SJohn Marinoproduce code for.
161*86d7f5d3SJohn Marino
162*86d7f5d3SJohn Marino   If you want to _use_ a cross compiler, that generates code for a
163*86d7f5d3SJohn Marinoplatform different from the build platform, you should specify the
164*86d7f5d3SJohn Marino"host" platform (i.e., that on which the generated programs will
165*86d7f5d3SJohn Marinoeventually be run) with `--host=TYPE'.
166*86d7f5d3SJohn Marino
167*86d7f5d3SJohn MarinoSharing Defaults
168*86d7f5d3SJohn Marino================
169*86d7f5d3SJohn Marino
170*86d7f5d3SJohn Marino   If you want to set default values for `configure' scripts to share,
171*86d7f5d3SJohn Marinoyou can create a site shell script called `config.site' that gives
172*86d7f5d3SJohn Marinodefault values for variables like `CC', `cache_file', and `prefix'.
173*86d7f5d3SJohn Marino`configure' looks for `PREFIX/share/config.site' if it exists, then
174*86d7f5d3SJohn Marino`PREFIX/etc/config.site' if it exists.  Or, you can set the
175*86d7f5d3SJohn Marino`CONFIG_SITE' environment variable to the location of the site script.
176*86d7f5d3SJohn MarinoA warning: not all `configure' scripts look for a site script.
177*86d7f5d3SJohn Marino
178*86d7f5d3SJohn MarinoDefining Variables
179*86d7f5d3SJohn Marino==================
180*86d7f5d3SJohn Marino
181*86d7f5d3SJohn Marino   Variables not defined in a site shell script can be set in the
182*86d7f5d3SJohn Marinoenvironment passed to `configure'.  However, some packages may run
183*86d7f5d3SJohn Marinoconfigure again during the build, and the customized values of these
184*86d7f5d3SJohn Marinovariables may be lost.  In order to avoid this problem, you should set
185*86d7f5d3SJohn Marinothem in the `configure' command line, using `VAR=value'.  For example:
186*86d7f5d3SJohn Marino
187*86d7f5d3SJohn Marino     ./configure CC=/usr/local2/bin/gcc
188*86d7f5d3SJohn Marino
189*86d7f5d3SJohn Marinowill cause the specified gcc to be used as the C compiler (unless it is
190*86d7f5d3SJohn Marinooverridden in the site shell script).
191*86d7f5d3SJohn Marino
192*86d7f5d3SJohn Marino`configure' Invocation
193*86d7f5d3SJohn Marino======================
194*86d7f5d3SJohn Marino
195*86d7f5d3SJohn Marino   `configure' recognizes the following options to control how it
196*86d7f5d3SJohn Marinooperates.
197*86d7f5d3SJohn Marino
198*86d7f5d3SJohn Marino`--help'
199*86d7f5d3SJohn Marino`-h'
200*86d7f5d3SJohn Marino     Print a summary of the options to `configure', and exit.
201*86d7f5d3SJohn Marino
202*86d7f5d3SJohn Marino`--version'
203*86d7f5d3SJohn Marino`-V'
204*86d7f5d3SJohn Marino     Print the version of Autoconf used to generate the `configure'
205*86d7f5d3SJohn Marino     script, and exit.
206*86d7f5d3SJohn Marino
207*86d7f5d3SJohn Marino`--cache-file=FILE'
208*86d7f5d3SJohn Marino     Enable the cache: use and save the results of the tests in FILE,
209*86d7f5d3SJohn Marino     traditionally `config.cache'.  FILE defaults to `/dev/null' to
210*86d7f5d3SJohn Marino     disable caching.
211*86d7f5d3SJohn Marino
212*86d7f5d3SJohn Marino`--config-cache'
213*86d7f5d3SJohn Marino`-C'
214*86d7f5d3SJohn Marino     Alias for `--cache-file=config.cache'.
215*86d7f5d3SJohn Marino
216*86d7f5d3SJohn Marino`--quiet'
217*86d7f5d3SJohn Marino`--silent'
218*86d7f5d3SJohn Marino`-q'
219*86d7f5d3SJohn Marino     Do not print messages saying which checks are being made.  To
220*86d7f5d3SJohn Marino     suppress all normal output, redirect it to `/dev/null' (any error
221*86d7f5d3SJohn Marino     messages will still be shown).
222*86d7f5d3SJohn Marino
223*86d7f5d3SJohn Marino`--srcdir=DIR'
224*86d7f5d3SJohn Marino     Look for the package's source code in directory DIR.  Usually
225*86d7f5d3SJohn Marino     `configure' can determine that directory automatically.
226*86d7f5d3SJohn Marino
227*86d7f5d3SJohn Marino`configure' also accepts some other, not widely useful, options.  Run
228*86d7f5d3SJohn Marino`configure --help' for more details.
229*86d7f5d3SJohn Marino
230