xref: /sqlite-3.40.0/autoconf/INSTALL (revision f6f8ac61)
1*f6f8ac61SdanInstallation Instructions
2*f6f8ac61Sdan*************************
3*f6f8ac61Sdan
4*f6f8ac61SdanCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5*f6f8ac61SdanInc.
6*f6f8ac61Sdan
7*f6f8ac61Sdan   Copying and distribution of this file, with or without modification,
8*f6f8ac61Sdanare permitted in any medium without royalty provided the copyright
9*f6f8ac61Sdannotice and this notice are preserved.  This file is offered as-is,
10*f6f8ac61Sdanwithout warranty of any kind.
11*f6f8ac61Sdan
12*f6f8ac61SdanBasic Installation
13*f6f8ac61Sdan==================
14*f6f8ac61Sdan
15*f6f8ac61Sdan   Briefly, the shell commands `./configure; make; make install' should
16*f6f8ac61Sdanconfigure, build, and install this package.  The following
17*f6f8ac61Sdanmore-detailed instructions are generic; see the `README' file for
18*f6f8ac61Sdaninstructions specific to this package.  Some packages provide this
19*f6f8ac61Sdan`INSTALL' file but do not implement all of the features documented
20*f6f8ac61Sdanbelow.  The lack of an optional feature in a given package is not
21*f6f8ac61Sdannecessarily a bug.  More recommendations for GNU packages can be found
22*f6f8ac61Sdanin *note Makefile Conventions: (standards)Makefile Conventions.
23*f6f8ac61Sdan
24*f6f8ac61Sdan   The `configure' shell script attempts to guess correct values for
25*f6f8ac61Sdanvarious system-dependent variables used during compilation.  It uses
26*f6f8ac61Sdanthose values to create a `Makefile' in each directory of the package.
27*f6f8ac61SdanIt may also create one or more `.h' files containing system-dependent
28*f6f8ac61Sdandefinitions.  Finally, it creates a shell script `config.status' that
29*f6f8ac61Sdanyou can run in the future to recreate the current configuration, and a
30*f6f8ac61Sdanfile `config.log' containing compiler output (useful mainly for
31*f6f8ac61Sdandebugging `configure').
32*f6f8ac61Sdan
33*f6f8ac61Sdan   It can also use an optional file (typically called `config.cache'
34*f6f8ac61Sdanand enabled with `--cache-file=config.cache' or simply `-C') that saves
35*f6f8ac61Sdanthe results of its tests to speed up reconfiguring.  Caching is
36*f6f8ac61Sdandisabled by default to prevent problems with accidental use of stale
37*f6f8ac61Sdancache files.
38*f6f8ac61Sdan
39*f6f8ac61Sdan   If you need to do unusual things to compile the package, please try
40*f6f8ac61Sdanto figure out how `configure' could check whether to do them, and mail
41*f6f8ac61Sdandiffs or instructions to the address given in the `README' so they can
42*f6f8ac61Sdanbe considered for the next release.  If you are using the cache, and at
43*f6f8ac61Sdansome point `config.cache' contains results you don't want to keep, you
44*f6f8ac61Sdanmay remove or edit it.
45*f6f8ac61Sdan
46*f6f8ac61Sdan   The file `configure.ac' (or `configure.in') is used to create
47*f6f8ac61Sdan`configure' by a program called `autoconf'.  You need `configure.ac' if
48*f6f8ac61Sdanyou want to change it or regenerate `configure' using a newer version
49*f6f8ac61Sdanof `autoconf'.
50*f6f8ac61Sdan
51*f6f8ac61Sdan   The simplest way to compile this package is:
52*f6f8ac61Sdan
53*f6f8ac61Sdan  1. `cd' to the directory containing the package's source code and type
54*f6f8ac61Sdan     `./configure' to configure the package for your system.
55*f6f8ac61Sdan
56*f6f8ac61Sdan     Running `configure' might take a while.  While running, it prints
57*f6f8ac61Sdan     some messages telling which features it is checking for.
58*f6f8ac61Sdan
59*f6f8ac61Sdan  2. Type `make' to compile the package.
60*f6f8ac61Sdan
61*f6f8ac61Sdan  3. Optionally, type `make check' to run any self-tests that come with
62*f6f8ac61Sdan     the package, generally using the just-built uninstalled binaries.
63*f6f8ac61Sdan
64*f6f8ac61Sdan  4. Type `make install' to install the programs and any data files and
65*f6f8ac61Sdan     documentation.  When installing into a prefix owned by root, it is
66*f6f8ac61Sdan     recommended that the package be configured and built as a regular
67*f6f8ac61Sdan     user, and only the `make install' phase executed with root
68*f6f8ac61Sdan     privileges.
69*f6f8ac61Sdan
70*f6f8ac61Sdan  5. Optionally, type `make installcheck' to repeat any self-tests, but
71*f6f8ac61Sdan     this time using the binaries in their final installed location.
72*f6f8ac61Sdan     This target does not install anything.  Running this target as a
73*f6f8ac61Sdan     regular user, particularly if the prior `make install' required
74*f6f8ac61Sdan     root privileges, verifies that the installation completed
75*f6f8ac61Sdan     correctly.
76*f6f8ac61Sdan
77*f6f8ac61Sdan  6. You can remove the program binaries and object files from the
78*f6f8ac61Sdan     source code directory by typing `make clean'.  To also remove the
79*f6f8ac61Sdan     files that `configure' created (so you can compile the package for
80*f6f8ac61Sdan     a different kind of computer), type `make distclean'.  There is
81*f6f8ac61Sdan     also a `make maintainer-clean' target, but that is intended mainly
82*f6f8ac61Sdan     for the package's developers.  If you use it, you may have to get
83*f6f8ac61Sdan     all sorts of other programs in order to regenerate files that came
84*f6f8ac61Sdan     with the distribution.
85*f6f8ac61Sdan
86*f6f8ac61Sdan  7. Often, you can also type `make uninstall' to remove the installed
87*f6f8ac61Sdan     files again.  In practice, not all packages have tested that
88*f6f8ac61Sdan     uninstallation works correctly, even though it is required by the
89*f6f8ac61Sdan     GNU Coding Standards.
90*f6f8ac61Sdan
91*f6f8ac61Sdan  8. Some packages, particularly those that use Automake, provide `make
92*f6f8ac61Sdan     distcheck', which can by used by developers to test that all other
93*f6f8ac61Sdan     targets like `make install' and `make uninstall' work correctly.
94*f6f8ac61Sdan     This target is generally not run by end users.
95*f6f8ac61Sdan
96*f6f8ac61SdanCompilers and Options
97*f6f8ac61Sdan=====================
98*f6f8ac61Sdan
99*f6f8ac61Sdan   Some systems require unusual options for compilation or linking that
100*f6f8ac61Sdanthe `configure' script does not know about.  Run `./configure --help'
101*f6f8ac61Sdanfor details on some of the pertinent environment variables.
102*f6f8ac61Sdan
103*f6f8ac61Sdan   You can give `configure' initial values for configuration parameters
104*f6f8ac61Sdanby setting variables in the command line or in the environment.  Here
105*f6f8ac61Sdanis an example:
106*f6f8ac61Sdan
107*f6f8ac61Sdan     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108*f6f8ac61Sdan
109*f6f8ac61Sdan   *Note Defining Variables::, for more details.
110*f6f8ac61Sdan
111*f6f8ac61SdanCompiling For Multiple Architectures
112*f6f8ac61Sdan====================================
113*f6f8ac61Sdan
114*f6f8ac61Sdan   You can compile the package for more than one kind of computer at the
115*f6f8ac61Sdansame time, by placing the object files for each architecture in their
116*f6f8ac61Sdanown directory.  To do this, you can use GNU `make'.  `cd' to the
117*f6f8ac61Sdandirectory where you want the object files and executables to go and run
118*f6f8ac61Sdanthe `configure' script.  `configure' automatically checks for the
119*f6f8ac61Sdansource code in the directory that `configure' is in and in `..'.  This
120*f6f8ac61Sdanis known as a "VPATH" build.
121*f6f8ac61Sdan
122*f6f8ac61Sdan   With a non-GNU `make', it is safer to compile the package for one
123*f6f8ac61Sdanarchitecture at a time in the source code directory.  After you have
124*f6f8ac61Sdaninstalled the package for one architecture, use `make distclean' before
125*f6f8ac61Sdanreconfiguring for another architecture.
126*f6f8ac61Sdan
127*f6f8ac61Sdan   On MacOS X 10.5 and later systems, you can create libraries and
128*f6f8ac61Sdanexecutables that work on multiple system types--known as "fat" or
129*f6f8ac61Sdan"universal" binaries--by specifying multiple `-arch' options to the
130*f6f8ac61Sdancompiler but only a single `-arch' option to the preprocessor.  Like
131*f6f8ac61Sdanthis:
132*f6f8ac61Sdan
133*f6f8ac61Sdan     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134*f6f8ac61Sdan                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135*f6f8ac61Sdan                 CPP="gcc -E" CXXCPP="g++ -E"
136*f6f8ac61Sdan
137*f6f8ac61Sdan   This is not guaranteed to produce working output in all cases, you
138*f6f8ac61Sdanmay have to build one architecture at a time and combine the results
139*f6f8ac61Sdanusing the `lipo' tool if you have problems.
140*f6f8ac61Sdan
141*f6f8ac61SdanInstallation Names
142*f6f8ac61Sdan==================
143*f6f8ac61Sdan
144*f6f8ac61Sdan   By default, `make install' installs the package's commands under
145*f6f8ac61Sdan`/usr/local/bin', include files under `/usr/local/include', etc.  You
146*f6f8ac61Sdancan specify an installation prefix other than `/usr/local' by giving
147*f6f8ac61Sdan`configure' the option `--prefix=PREFIX', where PREFIX must be an
148*f6f8ac61Sdanabsolute file name.
149*f6f8ac61Sdan
150*f6f8ac61Sdan   You can specify separate installation prefixes for
151*f6f8ac61Sdanarchitecture-specific files and architecture-independent files.  If you
152*f6f8ac61Sdanpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153*f6f8ac61SdanPREFIX as the prefix for installing programs and libraries.
154*f6f8ac61SdanDocumentation and other data files still use the regular prefix.
155*f6f8ac61Sdan
156*f6f8ac61Sdan   In addition, if you use an unusual directory layout you can give
157*f6f8ac61Sdanoptions like `--bindir=DIR' to specify different values for particular
158*f6f8ac61Sdankinds of files.  Run `configure --help' for a list of the directories
159*f6f8ac61Sdanyou can set and what kinds of files go in them.  In general, the
160*f6f8ac61Sdandefault for these options is expressed in terms of `${prefix}', so that
161*f6f8ac61Sdanspecifying just `--prefix' will affect all of the other directory
162*f6f8ac61Sdanspecifications that were not explicitly provided.
163*f6f8ac61Sdan
164*f6f8ac61Sdan   The most portable way to affect installation locations is to pass the
165*f6f8ac61Sdancorrect locations to `configure'; however, many packages provide one or
166*f6f8ac61Sdanboth of the following shortcuts of passing variable assignments to the
167*f6f8ac61Sdan`make install' command line to change installation locations without
168*f6f8ac61Sdanhaving to reconfigure or recompile.
169*f6f8ac61Sdan
170*f6f8ac61Sdan   The first method involves providing an override variable for each
171*f6f8ac61Sdanaffected directory.  For example, `make install
172*f6f8ac61Sdanprefix=/alternate/directory' will choose an alternate location for all
173*f6f8ac61Sdandirectory configuration variables that were expressed in terms of
174*f6f8ac61Sdan`${prefix}'.  Any directories that were specified during `configure',
175*f6f8ac61Sdanbut not in terms of `${prefix}', must each be overridden at install
176*f6f8ac61Sdantime for the entire installation to be relocated.  The approach of
177*f6f8ac61Sdanmakefile variable overrides for each directory variable is required by
178*f6f8ac61Sdanthe GNU Coding Standards, and ideally causes no recompilation.
179*f6f8ac61SdanHowever, some platforms have known limitations with the semantics of
180*f6f8ac61Sdanshared libraries that end up requiring recompilation when using this
181*f6f8ac61Sdanmethod, particularly noticeable in packages that use GNU Libtool.
182*f6f8ac61Sdan
183*f6f8ac61Sdan   The second method involves providing the `DESTDIR' variable.  For
184*f6f8ac61Sdanexample, `make install DESTDIR=/alternate/directory' will prepend
185*f6f8ac61Sdan`/alternate/directory' before all installation names.  The approach of
186*f6f8ac61Sdan`DESTDIR' overrides is not required by the GNU Coding Standards, and
187*f6f8ac61Sdandoes not work on platforms that have drive letters.  On the other hand,
188*f6f8ac61Sdanit does better at avoiding recompilation issues, and works well even
189*f6f8ac61Sdanwhen some directory options were not specified in terms of `${prefix}'
190*f6f8ac61Sdanat `configure' time.
191*f6f8ac61Sdan
192*f6f8ac61SdanOptional Features
193*f6f8ac61Sdan=================
194*f6f8ac61Sdan
195*f6f8ac61Sdan   If the package supports it, you can cause programs to be installed
196*f6f8ac61Sdanwith an extra prefix or suffix on their names by giving `configure' the
197*f6f8ac61Sdanoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198*f6f8ac61Sdan
199*f6f8ac61Sdan   Some packages pay attention to `--enable-FEATURE' options to
200*f6f8ac61Sdan`configure', where FEATURE indicates an optional part of the package.
201*f6f8ac61SdanThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202*f6f8ac61Sdanis something like `gnu-as' or `x' (for the X Window System).  The
203*f6f8ac61Sdan`README' should mention any `--enable-' and `--with-' options that the
204*f6f8ac61Sdanpackage recognizes.
205*f6f8ac61Sdan
206*f6f8ac61Sdan   For packages that use the X Window System, `configure' can usually
207*f6f8ac61Sdanfind the X include and library files automatically, but if it doesn't,
208*f6f8ac61Sdanyou can use the `configure' options `--x-includes=DIR' and
209*f6f8ac61Sdan`--x-libraries=DIR' to specify their locations.
210*f6f8ac61Sdan
211*f6f8ac61Sdan   Some packages offer the ability to configure how verbose the
212*f6f8ac61Sdanexecution of `make' will be.  For these packages, running `./configure
213*f6f8ac61Sdan--enable-silent-rules' sets the default to minimal output, which can be
214*f6f8ac61Sdanoverridden with `make V=1'; while running `./configure
215*f6f8ac61Sdan--disable-silent-rules' sets the default to verbose, which can be
216*f6f8ac61Sdanoverridden with `make V=0'.
217*f6f8ac61Sdan
218*f6f8ac61SdanParticular systems
219*f6f8ac61Sdan==================
220*f6f8ac61Sdan
221*f6f8ac61Sdan   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222*f6f8ac61SdanCC is not installed, it is recommended to use the following options in
223*f6f8ac61Sdanorder to use an ANSI C compiler:
224*f6f8ac61Sdan
225*f6f8ac61Sdan     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226*f6f8ac61Sdan
227*f6f8ac61Sdanand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228*f6f8ac61Sdan
229*f6f8ac61Sdan   HP-UX `make' updates targets which have the same time stamps as
230*f6f8ac61Sdantheir prerequisites, which makes it generally unusable when shipped
231*f6f8ac61Sdangenerated files such as `configure' are involved.  Use GNU `make'
232*f6f8ac61Sdaninstead.
233*f6f8ac61Sdan
234*f6f8ac61Sdan   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235*f6f8ac61Sdanparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236*f6f8ac61Sdana workaround.  If GNU CC is not installed, it is therefore recommended
237*f6f8ac61Sdanto try
238*f6f8ac61Sdan
239*f6f8ac61Sdan     ./configure CC="cc"
240*f6f8ac61Sdan
241*f6f8ac61Sdanand if that doesn't work, try
242*f6f8ac61Sdan
243*f6f8ac61Sdan     ./configure CC="cc -nodtk"
244*f6f8ac61Sdan
245*f6f8ac61Sdan   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246*f6f8ac61Sdandirectory contains several dysfunctional programs; working variants of
247*f6f8ac61Sdanthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248*f6f8ac61Sdanin your `PATH', put it _after_ `/usr/bin'.
249*f6f8ac61Sdan
250*f6f8ac61Sdan   On Haiku, software installed for all users goes in `/boot/common',
251*f6f8ac61Sdannot `/usr/local'.  It is recommended to use the following options:
252*f6f8ac61Sdan
253*f6f8ac61Sdan     ./configure --prefix=/boot/common
254*f6f8ac61Sdan
255*f6f8ac61SdanSpecifying the System Type
256*f6f8ac61Sdan==========================
257*f6f8ac61Sdan
258*f6f8ac61Sdan   There may be some features `configure' cannot figure out
259*f6f8ac61Sdanautomatically, but needs to determine by the type of machine the package
260*f6f8ac61Sdanwill run on.  Usually, assuming the package is built to be run on the
261*f6f8ac61Sdan_same_ architectures, `configure' can figure that out, but if it prints
262*f6f8ac61Sdana message saying it cannot guess the machine type, give it the
263*f6f8ac61Sdan`--build=TYPE' option.  TYPE can either be a short name for the system
264*f6f8ac61Sdantype, such as `sun4', or a canonical name which has the form:
265*f6f8ac61Sdan
266*f6f8ac61Sdan     CPU-COMPANY-SYSTEM
267*f6f8ac61Sdan
268*f6f8ac61Sdanwhere SYSTEM can have one of these forms:
269*f6f8ac61Sdan
270*f6f8ac61Sdan     OS
271*f6f8ac61Sdan     KERNEL-OS
272*f6f8ac61Sdan
273*f6f8ac61Sdan   See the file `config.sub' for the possible values of each field.  If
274*f6f8ac61Sdan`config.sub' isn't included in this package, then this package doesn't
275*f6f8ac61Sdanneed to know the machine type.
276*f6f8ac61Sdan
277*f6f8ac61Sdan   If you are _building_ compiler tools for cross-compiling, you should
278*f6f8ac61Sdanuse the option `--target=TYPE' to select the type of system they will
279*f6f8ac61Sdanproduce code for.
280*f6f8ac61Sdan
281*f6f8ac61Sdan   If you want to _use_ a cross compiler, that generates code for a
282*f6f8ac61Sdanplatform different from the build platform, you should specify the
283*f6f8ac61Sdan"host" platform (i.e., that on which the generated programs will
284*f6f8ac61Sdaneventually be run) with `--host=TYPE'.
285*f6f8ac61Sdan
286*f6f8ac61SdanSharing Defaults
287*f6f8ac61Sdan================
288*f6f8ac61Sdan
289*f6f8ac61Sdan   If you want to set default values for `configure' scripts to share,
290*f6f8ac61Sdanyou can create a site shell script called `config.site' that gives
291*f6f8ac61Sdandefault values for variables like `CC', `cache_file', and `prefix'.
292*f6f8ac61Sdan`configure' looks for `PREFIX/share/config.site' if it exists, then
293*f6f8ac61Sdan`PREFIX/etc/config.site' if it exists.  Or, you can set the
294*f6f8ac61Sdan`CONFIG_SITE' environment variable to the location of the site script.
295*f6f8ac61SdanA warning: not all `configure' scripts look for a site script.
296*f6f8ac61Sdan
297*f6f8ac61SdanDefining Variables
298*f6f8ac61Sdan==================
299*f6f8ac61Sdan
300*f6f8ac61Sdan   Variables not defined in a site shell script can be set in the
301*f6f8ac61Sdanenvironment passed to `configure'.  However, some packages may run
302*f6f8ac61Sdanconfigure again during the build, and the customized values of these
303*f6f8ac61Sdanvariables may be lost.  In order to avoid this problem, you should set
304*f6f8ac61Sdanthem in the `configure' command line, using `VAR=value'.  For example:
305*f6f8ac61Sdan
306*f6f8ac61Sdan     ./configure CC=/usr/local2/bin/gcc
307*f6f8ac61Sdan
308*f6f8ac61Sdancauses the specified `gcc' to be used as the C compiler (unless it is
309*f6f8ac61Sdanoverridden in the site shell script).
310*f6f8ac61Sdan
311*f6f8ac61SdanUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312*f6f8ac61Sdanan Autoconf bug.  Until the bug is fixed you can use this workaround:
313*f6f8ac61Sdan
314*f6f8ac61Sdan     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315*f6f8ac61Sdan
316*f6f8ac61Sdan`configure' Invocation
317*f6f8ac61Sdan======================
318*f6f8ac61Sdan
319*f6f8ac61Sdan   `configure' recognizes the following options to control how it
320*f6f8ac61Sdanoperates.
321*f6f8ac61Sdan
322*f6f8ac61Sdan`--help'
323*f6f8ac61Sdan`-h'
324*f6f8ac61Sdan     Print a summary of all of the options to `configure', and exit.
325*f6f8ac61Sdan
326*f6f8ac61Sdan`--help=short'
327*f6f8ac61Sdan`--help=recursive'
328*f6f8ac61Sdan     Print a summary of the options unique to this package's
329*f6f8ac61Sdan     `configure', and exit.  The `short' variant lists options used
330*f6f8ac61Sdan     only in the top level, while the `recursive' variant lists options
331*f6f8ac61Sdan     also present in any nested packages.
332*f6f8ac61Sdan
333*f6f8ac61Sdan`--version'
334*f6f8ac61Sdan`-V'
335*f6f8ac61Sdan     Print the version of Autoconf used to generate the `configure'
336*f6f8ac61Sdan     script, and exit.
337*f6f8ac61Sdan
338*f6f8ac61Sdan`--cache-file=FILE'
339*f6f8ac61Sdan     Enable the cache: use and save the results of the tests in FILE,
340*f6f8ac61Sdan     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341*f6f8ac61Sdan     disable caching.
342*f6f8ac61Sdan
343*f6f8ac61Sdan`--config-cache'
344*f6f8ac61Sdan`-C'
345*f6f8ac61Sdan     Alias for `--cache-file=config.cache'.
346*f6f8ac61Sdan
347*f6f8ac61Sdan`--quiet'
348*f6f8ac61Sdan`--silent'
349*f6f8ac61Sdan`-q'
350*f6f8ac61Sdan     Do not print messages saying which checks are being made.  To
351*f6f8ac61Sdan     suppress all normal output, redirect it to `/dev/null' (any error
352*f6f8ac61Sdan     messages will still be shown).
353*f6f8ac61Sdan
354*f6f8ac61Sdan`--srcdir=DIR'
355*f6f8ac61Sdan     Look for the package's source code in directory DIR.  Usually
356*f6f8ac61Sdan     `configure' can determine that directory automatically.
357*f6f8ac61Sdan
358*f6f8ac61Sdan`--prefix=DIR'
359*f6f8ac61Sdan     Use DIR as the installation prefix.  *note Installation Names::
360*f6f8ac61Sdan     for more details, including other options available for fine-tuning
361*f6f8ac61Sdan     the installation locations.
362*f6f8ac61Sdan
363*f6f8ac61Sdan`--no-create'
364*f6f8ac61Sdan`-n'
365*f6f8ac61Sdan     Run the configure checks, but stop before creating any output
366*f6f8ac61Sdan     files.
367*f6f8ac61Sdan
368*f6f8ac61Sdan`configure' also accepts some other, not widely useful, options.  Run
369*f6f8ac61Sdan`configure --help' for more details.
370*f6f8ac61Sdan
371