1736a7e2cSmrgInstallation Instructions
2736a7e2cSmrg*************************
3736a7e2cSmrg
4533545b5SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5533545b5SmrgInc.
6736a7e2cSmrg
7533545b5Smrg   Copying and distribution of this file, with or without modification,
8533545b5Smrgare permitted in any medium without royalty provided the copyright
9533545b5Smrgnotice and this notice are preserved.  This file is offered as-is,
10533545b5Smrgwithout warranty of any kind.
11736a7e2cSmrg
12736a7e2cSmrgBasic Installation
13736a7e2cSmrg==================
14736a7e2cSmrg
15736a7e2cSmrg   Briefly, the shell commands `./configure; make; make install' should
16736a7e2cSmrgconfigure, build, and install this package.  The following
17736a7e2cSmrgmore-detailed instructions are generic; see the `README' file for
18533545b5Smrginstructions specific to this package.  Some packages provide this
19533545b5Smrg`INSTALL' file but do not implement all of the features documented
20533545b5Smrgbelow.  The lack of an optional feature in a given package is not
21533545b5Smrgnecessarily a bug.  More recommendations for GNU packages can be found
22533545b5Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23736a7e2cSmrg
24736a7e2cSmrg   The `configure' shell script attempts to guess correct values for
25736a7e2cSmrgvarious system-dependent variables used during compilation.  It uses
26736a7e2cSmrgthose values to create a `Makefile' in each directory of the package.
27736a7e2cSmrgIt may also create one or more `.h' files containing system-dependent
28736a7e2cSmrgdefinitions.  Finally, it creates a shell script `config.status' that
29736a7e2cSmrgyou can run in the future to recreate the current configuration, and a
30736a7e2cSmrgfile `config.log' containing compiler output (useful mainly for
31736a7e2cSmrgdebugging `configure').
32736a7e2cSmrg
33736a7e2cSmrg   It can also use an optional file (typically called `config.cache'
34736a7e2cSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35736a7e2cSmrgthe results of its tests to speed up reconfiguring.  Caching is
36736a7e2cSmrgdisabled by default to prevent problems with accidental use of stale
37736a7e2cSmrgcache files.
38736a7e2cSmrg
39736a7e2cSmrg   If you need to do unusual things to compile the package, please try
40736a7e2cSmrgto figure out how `configure' could check whether to do them, and mail
41736a7e2cSmrgdiffs or instructions to the address given in the `README' so they can
42736a7e2cSmrgbe considered for the next release.  If you are using the cache, and at
43736a7e2cSmrgsome point `config.cache' contains results you don't want to keep, you
44736a7e2cSmrgmay remove or edit it.
45736a7e2cSmrg
46736a7e2cSmrg   The file `configure.ac' (or `configure.in') is used to create
47736a7e2cSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48736a7e2cSmrgyou want to change it or regenerate `configure' using a newer version
49736a7e2cSmrgof `autoconf'.
50736a7e2cSmrg
51533545b5Smrg   The simplest way to compile this package is:
52736a7e2cSmrg
53736a7e2cSmrg  1. `cd' to the directory containing the package's source code and type
54736a7e2cSmrg     `./configure' to configure the package for your system.
55736a7e2cSmrg
56736a7e2cSmrg     Running `configure' might take a while.  While running, it prints
57736a7e2cSmrg     some messages telling which features it is checking for.
58736a7e2cSmrg
59736a7e2cSmrg  2. Type `make' to compile the package.
60736a7e2cSmrg
61736a7e2cSmrg  3. Optionally, type `make check' to run any self-tests that come with
62533545b5Smrg     the package, generally using the just-built uninstalled binaries.
63736a7e2cSmrg
64736a7e2cSmrg  4. Type `make install' to install the programs and any data files and
65533545b5Smrg     documentation.  When installing into a prefix owned by root, it is
66533545b5Smrg     recommended that the package be configured and built as a regular
67533545b5Smrg     user, and only the `make install' phase executed with root
68533545b5Smrg     privileges.
69533545b5Smrg
70533545b5Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71533545b5Smrg     this time using the binaries in their final installed location.
72533545b5Smrg     This target does not install anything.  Running this target as a
73533545b5Smrg     regular user, particularly if the prior `make install' required
74533545b5Smrg     root privileges, verifies that the installation completed
75533545b5Smrg     correctly.
76533545b5Smrg
77533545b5Smrg  6. You can remove the program binaries and object files from the
78736a7e2cSmrg     source code directory by typing `make clean'.  To also remove the
79736a7e2cSmrg     files that `configure' created (so you can compile the package for
80736a7e2cSmrg     a different kind of computer), type `make distclean'.  There is
81736a7e2cSmrg     also a `make maintainer-clean' target, but that is intended mainly
82736a7e2cSmrg     for the package's developers.  If you use it, you may have to get
83736a7e2cSmrg     all sorts of other programs in order to regenerate files that came
84736a7e2cSmrg     with the distribution.
85736a7e2cSmrg
86533545b5Smrg  7. Often, you can also type `make uninstall' to remove the installed
87533545b5Smrg     files again.  In practice, not all packages have tested that
88533545b5Smrg     uninstallation works correctly, even though it is required by the
89533545b5Smrg     GNU Coding Standards.
90533545b5Smrg
91533545b5Smrg  8. Some packages, particularly those that use Automake, provide `make
92533545b5Smrg     distcheck', which can by used by developers to test that all other
93533545b5Smrg     targets like `make install' and `make uninstall' work correctly.
94533545b5Smrg     This target is generally not run by end users.
95736a7e2cSmrg
96736a7e2cSmrgCompilers and Options
97736a7e2cSmrg=====================
98736a7e2cSmrg
99736a7e2cSmrg   Some systems require unusual options for compilation or linking that
100736a7e2cSmrgthe `configure' script does not know about.  Run `./configure --help'
101736a7e2cSmrgfor details on some of the pertinent environment variables.
102736a7e2cSmrg
103736a7e2cSmrg   You can give `configure' initial values for configuration parameters
104736a7e2cSmrgby setting variables in the command line or in the environment.  Here
105736a7e2cSmrgis an example:
106736a7e2cSmrg
107736a7e2cSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108736a7e2cSmrg
109736a7e2cSmrg   *Note Defining Variables::, for more details.
110736a7e2cSmrg
111736a7e2cSmrgCompiling For Multiple Architectures
112736a7e2cSmrg====================================
113736a7e2cSmrg
114736a7e2cSmrg   You can compile the package for more than one kind of computer at the
115736a7e2cSmrgsame time, by placing the object files for each architecture in their
116736a7e2cSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117736a7e2cSmrgdirectory where you want the object files and executables to go and run
118736a7e2cSmrgthe `configure' script.  `configure' automatically checks for the
119533545b5Smrgsource code in the directory that `configure' is in and in `..'.  This
120533545b5Smrgis known as a "VPATH" build.
121736a7e2cSmrg
122736a7e2cSmrg   With a non-GNU `make', it is safer to compile the package for one
123736a7e2cSmrgarchitecture at a time in the source code directory.  After you have
124736a7e2cSmrginstalled the package for one architecture, use `make distclean' before
125736a7e2cSmrgreconfiguring for another architecture.
126736a7e2cSmrg
127736a7e2cSmrg   On MacOS X 10.5 and later systems, you can create libraries and
128736a7e2cSmrgexecutables that work on multiple system types--known as "fat" or
129736a7e2cSmrg"universal" binaries--by specifying multiple `-arch' options to the
130736a7e2cSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
131736a7e2cSmrgthis:
132736a7e2cSmrg
133736a7e2cSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134736a7e2cSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135736a7e2cSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
136736a7e2cSmrg
137736a7e2cSmrg   This is not guaranteed to produce working output in all cases, you
138736a7e2cSmrgmay have to build one architecture at a time and combine the results
139736a7e2cSmrgusing the `lipo' tool if you have problems.
140736a7e2cSmrg
141736a7e2cSmrgInstallation Names
142736a7e2cSmrg==================
143736a7e2cSmrg
144736a7e2cSmrg   By default, `make install' installs the package's commands under
145736a7e2cSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146736a7e2cSmrgcan specify an installation prefix other than `/usr/local' by giving
147533545b5Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148533545b5Smrgabsolute file name.
149736a7e2cSmrg
150736a7e2cSmrg   You can specify separate installation prefixes for
151736a7e2cSmrgarchitecture-specific files and architecture-independent files.  If you
152736a7e2cSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153736a7e2cSmrgPREFIX as the prefix for installing programs and libraries.
154736a7e2cSmrgDocumentation and other data files still use the regular prefix.
155736a7e2cSmrg
156736a7e2cSmrg   In addition, if you use an unusual directory layout you can give
157736a7e2cSmrgoptions like `--bindir=DIR' to specify different values for particular
158736a7e2cSmrgkinds of files.  Run `configure --help' for a list of the directories
159533545b5Smrgyou can set and what kinds of files go in them.  In general, the
160533545b5Smrgdefault for these options is expressed in terms of `${prefix}', so that
161533545b5Smrgspecifying just `--prefix' will affect all of the other directory
162533545b5Smrgspecifications that were not explicitly provided.
163533545b5Smrg
164533545b5Smrg   The most portable way to affect installation locations is to pass the
165533545b5Smrgcorrect locations to `configure'; however, many packages provide one or
166533545b5Smrgboth of the following shortcuts of passing variable assignments to the
167533545b5Smrg`make install' command line to change installation locations without
168533545b5Smrghaving to reconfigure or recompile.
169533545b5Smrg
170533545b5Smrg   The first method involves providing an override variable for each
171533545b5Smrgaffected directory.  For example, `make install
172533545b5Smrgprefix=/alternate/directory' will choose an alternate location for all
173533545b5Smrgdirectory configuration variables that were expressed in terms of
174533545b5Smrg`${prefix}'.  Any directories that were specified during `configure',
175533545b5Smrgbut not in terms of `${prefix}', must each be overridden at install
176533545b5Smrgtime for the entire installation to be relocated.  The approach of
177533545b5Smrgmakefile variable overrides for each directory variable is required by
178533545b5Smrgthe GNU Coding Standards, and ideally causes no recompilation.
179533545b5SmrgHowever, some platforms have known limitations with the semantics of
180533545b5Smrgshared libraries that end up requiring recompilation when using this
181533545b5Smrgmethod, particularly noticeable in packages that use GNU Libtool.
182533545b5Smrg
183533545b5Smrg   The second method involves providing the `DESTDIR' variable.  For
184533545b5Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
185533545b5Smrg`/alternate/directory' before all installation names.  The approach of
186533545b5Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187533545b5Smrgdoes not work on platforms that have drive letters.  On the other hand,
188533545b5Smrgit does better at avoiding recompilation issues, and works well even
189533545b5Smrgwhen some directory options were not specified in terms of `${prefix}'
190533545b5Smrgat `configure' time.
191533545b5Smrg
192533545b5SmrgOptional Features
193533545b5Smrg=================
194736a7e2cSmrg
195736a7e2cSmrg   If the package supports it, you can cause programs to be installed
196736a7e2cSmrgwith an extra prefix or suffix on their names by giving `configure' the
197736a7e2cSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198736a7e2cSmrg
199736a7e2cSmrg   Some packages pay attention to `--enable-FEATURE' options to
200736a7e2cSmrg`configure', where FEATURE indicates an optional part of the package.
201736a7e2cSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202736a7e2cSmrgis something like `gnu-as' or `x' (for the X Window System).  The
203736a7e2cSmrg`README' should mention any `--enable-' and `--with-' options that the
204736a7e2cSmrgpackage recognizes.
205736a7e2cSmrg
206736a7e2cSmrg   For packages that use the X Window System, `configure' can usually
207736a7e2cSmrgfind the X include and library files automatically, but if it doesn't,
208736a7e2cSmrgyou can use the `configure' options `--x-includes=DIR' and
209736a7e2cSmrg`--x-libraries=DIR' to specify their locations.
210736a7e2cSmrg
211533545b5Smrg   Some packages offer the ability to configure how verbose the
212533545b5Smrgexecution of `make' will be.  For these packages, running `./configure
213533545b5Smrg--enable-silent-rules' sets the default to minimal output, which can be
214533545b5Smrgoverridden with `make V=1'; while running `./configure
215533545b5Smrg--disable-silent-rules' sets the default to verbose, which can be
216533545b5Smrgoverridden with `make V=0'.
217533545b5Smrg
218736a7e2cSmrgParticular systems
219736a7e2cSmrg==================
220736a7e2cSmrg
221736a7e2cSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222736a7e2cSmrgCC is not installed, it is recommended to use the following options in
223736a7e2cSmrgorder to use an ANSI C compiler:
224736a7e2cSmrg
225533545b5Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226736a7e2cSmrg
227736a7e2cSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228736a7e2cSmrg
229533545b5Smrg   HP-UX `make' updates targets which have the same time stamps as
230533545b5Smrgtheir prerequisites, which makes it generally unusable when shipped
231533545b5Smrggenerated files such as `configure' are involved.  Use GNU `make'
232533545b5Smrginstead.
233533545b5Smrg
234736a7e2cSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235736a7e2cSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236736a7e2cSmrga workaround.  If GNU CC is not installed, it is therefore recommended
237736a7e2cSmrgto try
238736a7e2cSmrg
239736a7e2cSmrg     ./configure CC="cc"
240736a7e2cSmrg
241736a7e2cSmrgand if that doesn't work, try
242736a7e2cSmrg
243736a7e2cSmrg     ./configure CC="cc -nodtk"
244736a7e2cSmrg
245533545b5Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246533545b5Smrgdirectory contains several dysfunctional programs; working variants of
247533545b5Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248533545b5Smrgin your `PATH', put it _after_ `/usr/bin'.
249533545b5Smrg
250533545b5Smrg   On Haiku, software installed for all users goes in `/boot/common',
251533545b5Smrgnot `/usr/local'.  It is recommended to use the following options:
252533545b5Smrg
253533545b5Smrg     ./configure --prefix=/boot/common
254533545b5Smrg
255736a7e2cSmrgSpecifying the System Type
256736a7e2cSmrg==========================
257736a7e2cSmrg
258736a7e2cSmrg   There may be some features `configure' cannot figure out
259736a7e2cSmrgautomatically, but needs to determine by the type of machine the package
260736a7e2cSmrgwill run on.  Usually, assuming the package is built to be run on the
261736a7e2cSmrg_same_ architectures, `configure' can figure that out, but if it prints
262736a7e2cSmrga message saying it cannot guess the machine type, give it the
263736a7e2cSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
264736a7e2cSmrgtype, such as `sun4', or a canonical name which has the form:
265736a7e2cSmrg
266736a7e2cSmrg     CPU-COMPANY-SYSTEM
267736a7e2cSmrg
268736a7e2cSmrgwhere SYSTEM can have one of these forms:
269736a7e2cSmrg
270533545b5Smrg     OS
271533545b5Smrg     KERNEL-OS
272736a7e2cSmrg
273736a7e2cSmrg   See the file `config.sub' for the possible values of each field.  If
274736a7e2cSmrg`config.sub' isn't included in this package, then this package doesn't
275736a7e2cSmrgneed to know the machine type.
276736a7e2cSmrg
277736a7e2cSmrg   If you are _building_ compiler tools for cross-compiling, you should
278736a7e2cSmrguse the option `--target=TYPE' to select the type of system they will
279736a7e2cSmrgproduce code for.
280736a7e2cSmrg
281736a7e2cSmrg   If you want to _use_ a cross compiler, that generates code for a
282736a7e2cSmrgplatform different from the build platform, you should specify the
283736a7e2cSmrg"host" platform (i.e., that on which the generated programs will
284736a7e2cSmrgeventually be run) with `--host=TYPE'.
285736a7e2cSmrg
286736a7e2cSmrgSharing Defaults
287736a7e2cSmrg================
288736a7e2cSmrg
289736a7e2cSmrg   If you want to set default values for `configure' scripts to share,
290736a7e2cSmrgyou can create a site shell script called `config.site' that gives
291736a7e2cSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
292736a7e2cSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293736a7e2cSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294736a7e2cSmrg`CONFIG_SITE' environment variable to the location of the site script.
295736a7e2cSmrgA warning: not all `configure' scripts look for a site script.
296736a7e2cSmrg
297736a7e2cSmrgDefining Variables
298736a7e2cSmrg==================
299736a7e2cSmrg
300736a7e2cSmrg   Variables not defined in a site shell script can be set in the
301736a7e2cSmrgenvironment passed to `configure'.  However, some packages may run
302736a7e2cSmrgconfigure again during the build, and the customized values of these
303736a7e2cSmrgvariables may be lost.  In order to avoid this problem, you should set
304736a7e2cSmrgthem in the `configure' command line, using `VAR=value'.  For example:
305736a7e2cSmrg
306736a7e2cSmrg     ./configure CC=/usr/local2/bin/gcc
307736a7e2cSmrg
308736a7e2cSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
309736a7e2cSmrgoverridden in the site shell script).
310736a7e2cSmrg
311736a7e2cSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312736a7e2cSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313736a7e2cSmrg
314736a7e2cSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315736a7e2cSmrg
316736a7e2cSmrg`configure' Invocation
317736a7e2cSmrg======================
318736a7e2cSmrg
319736a7e2cSmrg   `configure' recognizes the following options to control how it
320736a7e2cSmrgoperates.
321736a7e2cSmrg
322736a7e2cSmrg`--help'
323736a7e2cSmrg`-h'
324736a7e2cSmrg     Print a summary of all of the options to `configure', and exit.
325736a7e2cSmrg
326736a7e2cSmrg`--help=short'
327736a7e2cSmrg`--help=recursive'
328736a7e2cSmrg     Print a summary of the options unique to this package's
329736a7e2cSmrg     `configure', and exit.  The `short' variant lists options used
330736a7e2cSmrg     only in the top level, while the `recursive' variant lists options
331736a7e2cSmrg     also present in any nested packages.
332736a7e2cSmrg
333736a7e2cSmrg`--version'
334736a7e2cSmrg`-V'
335736a7e2cSmrg     Print the version of Autoconf used to generate the `configure'
336736a7e2cSmrg     script, and exit.
337736a7e2cSmrg
338736a7e2cSmrg`--cache-file=FILE'
339736a7e2cSmrg     Enable the cache: use and save the results of the tests in FILE,
340736a7e2cSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341736a7e2cSmrg     disable caching.
342736a7e2cSmrg
343736a7e2cSmrg`--config-cache'
344736a7e2cSmrg`-C'
345736a7e2cSmrg     Alias for `--cache-file=config.cache'.
346736a7e2cSmrg
347736a7e2cSmrg`--quiet'
348736a7e2cSmrg`--silent'
349736a7e2cSmrg`-q'
350736a7e2cSmrg     Do not print messages saying which checks are being made.  To
351736a7e2cSmrg     suppress all normal output, redirect it to `/dev/null' (any error
352736a7e2cSmrg     messages will still be shown).
353736a7e2cSmrg
354736a7e2cSmrg`--srcdir=DIR'
355736a7e2cSmrg     Look for the package's source code in directory DIR.  Usually
356736a7e2cSmrg     `configure' can determine that directory automatically.
357736a7e2cSmrg
358736a7e2cSmrg`--prefix=DIR'
359533545b5Smrg     Use DIR as the installation prefix.  *note Installation Names::
360736a7e2cSmrg     for more details, including other options available for fine-tuning
361736a7e2cSmrg     the installation locations.
362736a7e2cSmrg
363736a7e2cSmrg`--no-create'
364736a7e2cSmrg`-n'
365736a7e2cSmrg     Run the configure checks, but stop before creating any output
366736a7e2cSmrg     files.
367736a7e2cSmrg
368736a7e2cSmrg`configure' also accepts some other, not widely useful, options.  Run
369736a7e2cSmrg`configure --help' for more details.
370736a7e2cSmrg
371