xref: /aosp_15_r20/external/libconfig/INSTALL (revision 2e9d491483b805f09ea864149eadd5680efcc72a)
1*2e9d4914SAndroid Build Coastguard WorkerInstallation Instructions
2*2e9d4914SAndroid Build Coastguard Worker*************************
3*2e9d4914SAndroid Build Coastguard Worker
4*2e9d4914SAndroid Build Coastguard WorkerCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free
5*2e9d4914SAndroid Build Coastguard WorkerSoftware Foundation, Inc.
6*2e9d4914SAndroid Build Coastguard Worker
7*2e9d4914SAndroid Build Coastguard WorkerThis file is free documentation; the Free Software Foundation gives
8*2e9d4914SAndroid Build Coastguard Workerunlimited permission to copy, distribute and modify it.
9*2e9d4914SAndroid Build Coastguard Worker
10*2e9d4914SAndroid Build Coastguard WorkerInstallation from Cloned Git Repository
11*2e9d4914SAndroid Build Coastguard Worker=======================================
12*2e9d4914SAndroid Build Coastguard Worker
13*2e9d4914SAndroid Build Coastguard WorkerIf you obtained the package by cloning the git repository, there are some
14*2e9d4914SAndroid Build Coastguard Workeradditional steps required to build the package, as the generated 'configure'
15*2e9d4914SAndroid Build Coastguard Workerscript and other supporting build files are not included in the repository.
16*2e9d4914SAndroid Build Coastguard Worker
17*2e9d4914SAndroid Build Coastguard WorkerYou must have the GNU autotools installed:
18*2e9d4914SAndroid Build Coastguard Worker
19*2e9d4914SAndroid Build Coastguard Worker- autoconf (version 2.69 or newer recommended)
20*2e9d4914SAndroid Build Coastguard Worker- automake (version 1.15 or newer recommended)
21*2e9d4914SAndroid Build Coastguard Worker- libtool (version 2.4.6 or newer recommended)
22*2e9d4914SAndroid Build Coastguard Worker
23*2e9d4914SAndroid Build Coastguard WorkerIf you plan to modify the source code, you may also need the following:
24*2e9d4914SAndroid Build Coastguard Worker
25*2e9d4914SAndroid Build Coastguard Worker- GNU Bison (verison 3.0.4 or newer required)
26*2e9d4914SAndroid Build Coastguard Worker- flex (version 2.6.4 or newer required)
27*2e9d4914SAndroid Build Coastguard Worker
28*2e9d4914SAndroid Build Coastguard WorkerGenerate the 'configure' script and other necessary build files by running
29*2e9d4914SAndroid Build Coastguard Worker'autoreconf' in the toplevel libconfig directory.
30*2e9d4914SAndroid Build Coastguard Worker
31*2e9d4914SAndroid Build Coastguard WorkerThen, follow the basic installation instructions below.
32*2e9d4914SAndroid Build Coastguard Worker
33*2e9d4914SAndroid Build Coastguard WorkerBasic Installation
34*2e9d4914SAndroid Build Coastguard Worker==================
35*2e9d4914SAndroid Build Coastguard Worker
36*2e9d4914SAndroid Build Coastguard WorkerThese are generic installation instructions when building from a released
37*2e9d4914SAndroid Build Coastguard Workerdistribution tarball.
38*2e9d4914SAndroid Build Coastguard Worker
39*2e9d4914SAndroid Build Coastguard Worker   The `configure' shell script attempts to guess correct values for
40*2e9d4914SAndroid Build Coastguard Workervarious system-dependent variables used during compilation.  It uses
41*2e9d4914SAndroid Build Coastguard Workerthose values to create a `Makefile' in each directory of the package.
42*2e9d4914SAndroid Build Coastguard WorkerIt may also create one or more `.h' files containing system-dependent
43*2e9d4914SAndroid Build Coastguard Workerdefinitions.  Finally, it creates a shell script `config.status' that
44*2e9d4914SAndroid Build Coastguard Workeryou can run in the future to recreate the current configuration, and a
45*2e9d4914SAndroid Build Coastguard Workerfile `config.log' containing compiler output (useful mainly for
46*2e9d4914SAndroid Build Coastguard Workerdebugging `configure').
47*2e9d4914SAndroid Build Coastguard Worker
48*2e9d4914SAndroid Build Coastguard Worker   It can also use an optional file (typically called `config.cache'
49*2e9d4914SAndroid Build Coastguard Workerand enabled with `--cache-file=config.cache' or simply `-C') that saves
50*2e9d4914SAndroid Build Coastguard Workerthe results of its tests to speed up reconfiguring.  (Caching is
51*2e9d4914SAndroid Build Coastguard Workerdisabled by default to prevent problems with accidental use of stale
52*2e9d4914SAndroid Build Coastguard Workercache files.)
53*2e9d4914SAndroid Build Coastguard Worker
54*2e9d4914SAndroid Build Coastguard Worker   If you need to do unusual things to compile the package, please try
55*2e9d4914SAndroid Build Coastguard Workerto figure out how `configure' could check whether to do them, and mail
56*2e9d4914SAndroid Build Coastguard Workerdiffs or instructions to the address given in the `README' so they can
57*2e9d4914SAndroid Build Coastguard Workerbe considered for the next release.  If you are using the cache, and at
58*2e9d4914SAndroid Build Coastguard Workersome point `config.cache' contains results you don't want to keep, you
59*2e9d4914SAndroid Build Coastguard Workermay remove or edit it.
60*2e9d4914SAndroid Build Coastguard Worker
61*2e9d4914SAndroid Build Coastguard Worker   The file `configure.ac' (or `configure.in') is used to create
62*2e9d4914SAndroid Build Coastguard Worker`configure' by a program called `autoconf'.  You only need
63*2e9d4914SAndroid Build Coastguard Worker`configure.ac' if you want to change it or regenerate `configure' using
64*2e9d4914SAndroid Build Coastguard Workera newer version of `autoconf'.
65*2e9d4914SAndroid Build Coastguard Worker
66*2e9d4914SAndroid Build Coastguard WorkerThe simplest way to compile this package is:
67*2e9d4914SAndroid Build Coastguard Worker
68*2e9d4914SAndroid Build Coastguard Worker  1. `cd' to the directory containing the package's source code and type
69*2e9d4914SAndroid Build Coastguard Worker     `./configure' to configure the package for your system.  If you're
70*2e9d4914SAndroid Build Coastguard Worker     using `csh' on an old version of System V, you might need to type
71*2e9d4914SAndroid Build Coastguard Worker     `sh ./configure' instead to prevent `csh' from trying to execute
72*2e9d4914SAndroid Build Coastguard Worker     `configure' itself.
73*2e9d4914SAndroid Build Coastguard Worker
74*2e9d4914SAndroid Build Coastguard Worker     Running `configure' takes awhile.  While running, it prints some
75*2e9d4914SAndroid Build Coastguard Worker     messages telling which features it is checking for.
76*2e9d4914SAndroid Build Coastguard Worker
77*2e9d4914SAndroid Build Coastguard Worker  2. Type `make' to compile the package.
78*2e9d4914SAndroid Build Coastguard Worker
79*2e9d4914SAndroid Build Coastguard Worker  3. Optionally, type `make check' to run any self-tests that come with
80*2e9d4914SAndroid Build Coastguard Worker     the package.
81*2e9d4914SAndroid Build Coastguard Worker
82*2e9d4914SAndroid Build Coastguard Worker  4. Type `make install' to install the programs and any data files and
83*2e9d4914SAndroid Build Coastguard Worker     documentation.
84*2e9d4914SAndroid Build Coastguard Worker
85*2e9d4914SAndroid Build Coastguard Worker  5. You can remove the program binaries and object files from the
86*2e9d4914SAndroid Build Coastguard Worker     source code directory by typing `make clean'.  To also remove the
87*2e9d4914SAndroid Build Coastguard Worker     files that `configure' created (so you can compile the package for
88*2e9d4914SAndroid Build Coastguard Worker     a different kind of computer), type `make distclean'.  There is
89*2e9d4914SAndroid Build Coastguard Worker     also a `make maintainer-clean' target, but that is intended mainly
90*2e9d4914SAndroid Build Coastguard Worker     for the package's developers.  If you use it, you may have to get
91*2e9d4914SAndroid Build Coastguard Worker     all sorts of other programs in order to regenerate files that came
92*2e9d4914SAndroid Build Coastguard Worker     with the distribution.
93*2e9d4914SAndroid Build Coastguard Worker
94*2e9d4914SAndroid Build Coastguard WorkerCompilers and Options
95*2e9d4914SAndroid Build Coastguard Worker=====================
96*2e9d4914SAndroid Build Coastguard Worker
97*2e9d4914SAndroid Build Coastguard WorkerSome systems require unusual options for compilation or linking that the
98*2e9d4914SAndroid Build Coastguard Worker`configure' script does not know about.  Run `./configure --help' for
99*2e9d4914SAndroid Build Coastguard Workerdetails on some of the pertinent environment variables.
100*2e9d4914SAndroid Build Coastguard Worker
101*2e9d4914SAndroid Build Coastguard Worker   You can give `configure' initial values for configuration parameters
102*2e9d4914SAndroid Build Coastguard Workerby setting variables in the command line or in the environment.  Here
103*2e9d4914SAndroid Build Coastguard Workeris an example:
104*2e9d4914SAndroid Build Coastguard Worker
105*2e9d4914SAndroid Build Coastguard Worker     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
106*2e9d4914SAndroid Build Coastguard Worker
107*2e9d4914SAndroid Build Coastguard Worker   *Note Defining Variables::, for more details.
108*2e9d4914SAndroid Build Coastguard Worker
109*2e9d4914SAndroid Build Coastguard WorkerCompiling For Multiple Architectures
110*2e9d4914SAndroid Build Coastguard Worker====================================
111*2e9d4914SAndroid Build Coastguard Worker
112*2e9d4914SAndroid Build Coastguard WorkerYou can compile the package for more than one kind of computer at the
113*2e9d4914SAndroid Build Coastguard Workersame time, by placing the object files for each architecture in their
114*2e9d4914SAndroid Build Coastguard Workerown directory.  To do this, you must use a version of `make' that
115*2e9d4914SAndroid Build Coastguard Workersupports the `VPATH' variable, such as GNU `make'.  `cd' to the
116*2e9d4914SAndroid Build Coastguard Workerdirectory where you want the object files and executables to go and run
117*2e9d4914SAndroid Build Coastguard Workerthe `configure' script.  `configure' automatically checks for the
118*2e9d4914SAndroid Build Coastguard Workersource code in the directory that `configure' is in and in `..'.
119*2e9d4914SAndroid Build Coastguard Worker
120*2e9d4914SAndroid Build Coastguard Worker   If you have to use a `make' that does not support the `VPATH'
121*2e9d4914SAndroid Build Coastguard Workervariable, you have to compile the package for one architecture at a
122*2e9d4914SAndroid Build Coastguard Workertime in the source code directory.  After you have installed the
123*2e9d4914SAndroid Build Coastguard Workerpackage for one architecture, use `make distclean' before reconfiguring
124*2e9d4914SAndroid Build Coastguard Workerfor another architecture.
125*2e9d4914SAndroid Build Coastguard Worker
126*2e9d4914SAndroid Build Coastguard WorkerInstallation Names
127*2e9d4914SAndroid Build Coastguard Worker==================
128*2e9d4914SAndroid Build Coastguard Worker
129*2e9d4914SAndroid Build Coastguard WorkerBy default, `make install' will install the package's files in
130*2e9d4914SAndroid Build Coastguard Worker`/usr/local/bin', `/usr/local/man', etc.  You can specify an
131*2e9d4914SAndroid Build Coastguard Workerinstallation prefix other than `/usr/local' by giving `configure' the
132*2e9d4914SAndroid Build Coastguard Workeroption `--prefix=PREFIX'.
133*2e9d4914SAndroid Build Coastguard Worker
134*2e9d4914SAndroid Build Coastguard Worker   You can specify separate installation prefixes for
135*2e9d4914SAndroid Build Coastguard Workerarchitecture-specific files and architecture-independent files.  If you
136*2e9d4914SAndroid Build Coastguard Workergive `configure' the option `--exec-prefix=PREFIX', the package will
137*2e9d4914SAndroid Build Coastguard Workeruse PREFIX as the prefix for installing programs and libraries.
138*2e9d4914SAndroid Build Coastguard WorkerDocumentation and other data files will still use the regular prefix.
139*2e9d4914SAndroid Build Coastguard Worker
140*2e9d4914SAndroid Build Coastguard Worker   In addition, if you use an unusual directory layout you can give
141*2e9d4914SAndroid Build Coastguard Workeroptions like `--bindir=DIR' to specify different values for particular
142*2e9d4914SAndroid Build Coastguard Workerkinds of files.  Run `configure --help' for a list of the directories
143*2e9d4914SAndroid Build Coastguard Workeryou can set and what kinds of files go in them.
144*2e9d4914SAndroid Build Coastguard Worker
145*2e9d4914SAndroid Build Coastguard Worker   If the package supports it, you can cause programs to be installed
146*2e9d4914SAndroid Build Coastguard Workerwith an extra prefix or suffix on their names by giving `configure' the
147*2e9d4914SAndroid Build Coastguard Workeroption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
148*2e9d4914SAndroid Build Coastguard Worker
149*2e9d4914SAndroid Build Coastguard WorkerOptional Features
150*2e9d4914SAndroid Build Coastguard Worker=================
151*2e9d4914SAndroid Build Coastguard Worker
152*2e9d4914SAndroid Build Coastguard WorkerSome packages pay attention to `--enable-FEATURE' options to
153*2e9d4914SAndroid Build Coastguard Worker`configure', where FEATURE indicates an optional part of the package.
154*2e9d4914SAndroid Build Coastguard WorkerThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
155*2e9d4914SAndroid Build Coastguard Workeris something like `gnu-as' or `x' (for the X Window System).  The
156*2e9d4914SAndroid Build Coastguard Worker`README' should mention any `--enable-' and `--with-' options that the
157*2e9d4914SAndroid Build Coastguard Workerpackage recognizes.
158*2e9d4914SAndroid Build Coastguard Worker
159*2e9d4914SAndroid Build Coastguard Worker   For packages that use the X Window System, `configure' can usually
160*2e9d4914SAndroid Build Coastguard Workerfind the X include and library files automatically, but if it doesn't,
161*2e9d4914SAndroid Build Coastguard Workeryou can use the `configure' options `--x-includes=DIR' and
162*2e9d4914SAndroid Build Coastguard Worker`--x-libraries=DIR' to specify their locations.
163*2e9d4914SAndroid Build Coastguard Worker
164*2e9d4914SAndroid Build Coastguard WorkerSpecifying the System Type
165*2e9d4914SAndroid Build Coastguard Worker==========================
166*2e9d4914SAndroid Build Coastguard Worker
167*2e9d4914SAndroid Build Coastguard WorkerThere may be some features `configure' cannot figure out automatically,
168*2e9d4914SAndroid Build Coastguard Workerbut needs to determine by the type of machine the package will run on.
169*2e9d4914SAndroid Build Coastguard WorkerUsually, assuming the package is built to be run on the _same_
170*2e9d4914SAndroid Build Coastguard Workerarchitectures, `configure' can figure that out, but if it prints a
171*2e9d4914SAndroid Build Coastguard Workermessage saying it cannot guess the machine type, give it the
172*2e9d4914SAndroid Build Coastguard Worker`--build=TYPE' option.  TYPE can either be a short name for the system
173*2e9d4914SAndroid Build Coastguard Workertype, such as `sun4', or a canonical name which has the form:
174*2e9d4914SAndroid Build Coastguard Worker
175*2e9d4914SAndroid Build Coastguard Worker     CPU-COMPANY-SYSTEM
176*2e9d4914SAndroid Build Coastguard Worker
177*2e9d4914SAndroid Build Coastguard Workerwhere SYSTEM can have one of these forms:
178*2e9d4914SAndroid Build Coastguard Worker
179*2e9d4914SAndroid Build Coastguard Worker     OS KERNEL-OS
180*2e9d4914SAndroid Build Coastguard Worker
181*2e9d4914SAndroid Build Coastguard Worker   See the file `config.sub' for the possible values of each field.  If
182*2e9d4914SAndroid Build Coastguard Worker`config.sub' isn't included in this package, then this package doesn't
183*2e9d4914SAndroid Build Coastguard Workerneed to know the machine type.
184*2e9d4914SAndroid Build Coastguard Worker
185*2e9d4914SAndroid Build Coastguard Worker   If you are _building_ compiler tools for cross-compiling, you should
186*2e9d4914SAndroid Build Coastguard Workeruse the `--target=TYPE' option to select the type of system they will
187*2e9d4914SAndroid Build Coastguard Workerproduce code for.
188*2e9d4914SAndroid Build Coastguard Worker
189*2e9d4914SAndroid Build Coastguard Worker   If you want to _use_ a cross compiler, that generates code for a
190*2e9d4914SAndroid Build Coastguard Workerplatform different from the build platform, you should specify the
191*2e9d4914SAndroid Build Coastguard Worker"host" platform (i.e., that on which the generated programs will
192*2e9d4914SAndroid Build Coastguard Workereventually be run) with `--host=TYPE'.
193*2e9d4914SAndroid Build Coastguard Worker
194*2e9d4914SAndroid Build Coastguard WorkerSharing Defaults
195*2e9d4914SAndroid Build Coastguard Worker================
196*2e9d4914SAndroid Build Coastguard Worker
197*2e9d4914SAndroid Build Coastguard WorkerIf you want to set default values for `configure' scripts to share, you
198*2e9d4914SAndroid Build Coastguard Workercan create a site shell script called `config.site' that gives default
199*2e9d4914SAndroid Build Coastguard Workervalues for variables like `CC', `cache_file', and `prefix'.
200*2e9d4914SAndroid Build Coastguard Worker`configure' looks for `PREFIX/share/config.site' if it exists, then
201*2e9d4914SAndroid Build Coastguard Worker`PREFIX/etc/config.site' if it exists.  Or, you can set the
202*2e9d4914SAndroid Build Coastguard Worker`CONFIG_SITE' environment variable to the location of the site script.
203*2e9d4914SAndroid Build Coastguard WorkerA warning: not all `configure' scripts look for a site script.
204*2e9d4914SAndroid Build Coastguard Worker
205*2e9d4914SAndroid Build Coastguard WorkerDefining Variables
206*2e9d4914SAndroid Build Coastguard Worker==================
207*2e9d4914SAndroid Build Coastguard Worker
208*2e9d4914SAndroid Build Coastguard WorkerVariables not defined in a site shell script can be set in the
209*2e9d4914SAndroid Build Coastguard Workerenvironment passed to `configure'.  However, some packages may run
210*2e9d4914SAndroid Build Coastguard Workerconfigure again during the build, and the customized values of these
211*2e9d4914SAndroid Build Coastguard Workervariables may be lost.  In order to avoid this problem, you should set
212*2e9d4914SAndroid Build Coastguard Workerthem in the `configure' command line, using `VAR=value'.  For example:
213*2e9d4914SAndroid Build Coastguard Worker
214*2e9d4914SAndroid Build Coastguard Worker     ./configure CC=/usr/local2/bin/gcc
215*2e9d4914SAndroid Build Coastguard Worker
216*2e9d4914SAndroid Build Coastguard Workerwill cause the specified gcc to be used as the C compiler (unless it is
217*2e9d4914SAndroid Build Coastguard Workeroverridden in the site shell script).
218*2e9d4914SAndroid Build Coastguard Worker
219*2e9d4914SAndroid Build Coastguard Worker`configure' Invocation
220*2e9d4914SAndroid Build Coastguard Worker======================
221*2e9d4914SAndroid Build Coastguard Worker
222*2e9d4914SAndroid Build Coastguard Worker`configure' recognizes the following options to control how it operates.
223*2e9d4914SAndroid Build Coastguard Worker
224*2e9d4914SAndroid Build Coastguard Worker`--help'
225*2e9d4914SAndroid Build Coastguard Worker`-h'
226*2e9d4914SAndroid Build Coastguard Worker     Print a summary of the options to `configure', and exit.
227*2e9d4914SAndroid Build Coastguard Worker
228*2e9d4914SAndroid Build Coastguard Worker`--version'
229*2e9d4914SAndroid Build Coastguard Worker`-V'
230*2e9d4914SAndroid Build Coastguard Worker     Print the version of Autoconf used to generate the `configure'
231*2e9d4914SAndroid Build Coastguard Worker     script, and exit.
232*2e9d4914SAndroid Build Coastguard Worker
233*2e9d4914SAndroid Build Coastguard Worker`--cache-file=FILE'
234*2e9d4914SAndroid Build Coastguard Worker     Enable the cache: use and save the results of the tests in FILE,
235*2e9d4914SAndroid Build Coastguard Worker     traditionally `config.cache'.  FILE defaults to `/dev/null' to
236*2e9d4914SAndroid Build Coastguard Worker     disable caching.
237*2e9d4914SAndroid Build Coastguard Worker
238*2e9d4914SAndroid Build Coastguard Worker`--config-cache'
239*2e9d4914SAndroid Build Coastguard Worker`-C'
240*2e9d4914SAndroid Build Coastguard Worker     Alias for `--cache-file=config.cache'.
241*2e9d4914SAndroid Build Coastguard Worker
242*2e9d4914SAndroid Build Coastguard Worker`--quiet'
243*2e9d4914SAndroid Build Coastguard Worker`--silent'
244*2e9d4914SAndroid Build Coastguard Worker`-q'
245*2e9d4914SAndroid Build Coastguard Worker     Do not print messages saying which checks are being made.  To
246*2e9d4914SAndroid Build Coastguard Worker     suppress all normal output, redirect it to `/dev/null' (any error
247*2e9d4914SAndroid Build Coastguard Worker     messages will still be shown).
248*2e9d4914SAndroid Build Coastguard Worker
249*2e9d4914SAndroid Build Coastguard Worker`--srcdir=DIR'
250*2e9d4914SAndroid Build Coastguard Worker     Look for the package's source code in directory DIR.  Usually
251*2e9d4914SAndroid Build Coastguard Worker     `configure' can determine that directory automatically.
252*2e9d4914SAndroid Build Coastguard Worker
253*2e9d4914SAndroid Build Coastguard Worker`configure' also accepts some other, not widely useful, options.  Run
254*2e9d4914SAndroid Build Coastguard Worker`configure --help' for more details.
255*2e9d4914SAndroid Build Coastguard Worker
256