1e8ead290SmrgInstallation Instructions
2e8ead290Smrg*************************
3e8ead290Smrg
49d0ccd10SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
59d0ccd10SmrgInc.
67914d74bSmrg
79d0ccd10Smrg   Copying and distribution of this file, with or without modification,
89d0ccd10Smrgare permitted in any medium without royalty provided the copyright
99d0ccd10Smrgnotice and this notice are preserved.  This file is offered as-is,
109d0ccd10Smrgwithout warranty of any kind.
117914d74bSmrg
127914d74bSmrgBasic Installation
137914d74bSmrg==================
147914d74bSmrg
15e8ead290Smrg   Briefly, the shell commands `./configure; make; make install' should
16e8ead290Smrgconfigure, build, and install this package.  The following
17e8ead290Smrgmore-detailed instructions are generic; see the `README' file for
189d0ccd10Smrginstructions specific to this package.  Some packages provide this
199d0ccd10Smrg`INSTALL' file but do not implement all of the features documented
209d0ccd10Smrgbelow.  The lack of an optional feature in a given package is not
219d0ccd10Smrgnecessarily a bug.  More recommendations for GNU packages can be found
229d0ccd10Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
237914d74bSmrg
247914d74bSmrg   The `configure' shell script attempts to guess correct values for
257914d74bSmrgvarious system-dependent variables used during compilation.  It uses
267914d74bSmrgthose values to create a `Makefile' in each directory of the package.
277914d74bSmrgIt may also create one or more `.h' files containing system-dependent
287914d74bSmrgdefinitions.  Finally, it creates a shell script `config.status' that
297914d74bSmrgyou can run in the future to recreate the current configuration, and a
307914d74bSmrgfile `config.log' containing compiler output (useful mainly for
317914d74bSmrgdebugging `configure').
327914d74bSmrg
337914d74bSmrg   It can also use an optional file (typically called `config.cache'
347914d74bSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35e8ead290Smrgthe results of its tests to speed up reconfiguring.  Caching is
367914d74bSmrgdisabled by default to prevent problems with accidental use of stale
37e8ead290Smrgcache files.
387914d74bSmrg
397914d74bSmrg   If you need to do unusual things to compile the package, please try
407914d74bSmrgto figure out how `configure' could check whether to do them, and mail
417914d74bSmrgdiffs or instructions to the address given in the `README' so they can
427914d74bSmrgbe considered for the next release.  If you are using the cache, and at
437914d74bSmrgsome point `config.cache' contains results you don't want to keep, you
447914d74bSmrgmay remove or edit it.
457914d74bSmrg
467914d74bSmrg   The file `configure.ac' (or `configure.in') is used to create
47e8ead290Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48e8ead290Smrgyou want to change it or regenerate `configure' using a newer version
49e8ead290Smrgof `autoconf'.
507914d74bSmrg
519d0ccd10Smrg   The simplest way to compile this package is:
527914d74bSmrg
537914d74bSmrg  1. `cd' to the directory containing the package's source code and type
54e8ead290Smrg     `./configure' to configure the package for your system.
557914d74bSmrg
56e8ead290Smrg     Running `configure' might take a while.  While running, it prints
57e8ead290Smrg     some messages telling which features it is checking for.
587914d74bSmrg
597914d74bSmrg  2. Type `make' to compile the package.
607914d74bSmrg
617914d74bSmrg  3. Optionally, type `make check' to run any self-tests that come with
629d0ccd10Smrg     the package, generally using the just-built uninstalled binaries.
637914d74bSmrg
647914d74bSmrg  4. Type `make install' to install the programs and any data files and
659d0ccd10Smrg     documentation.  When installing into a prefix owned by root, it is
669d0ccd10Smrg     recommended that the package be configured and built as a regular
679d0ccd10Smrg     user, and only the `make install' phase executed with root
689d0ccd10Smrg     privileges.
699d0ccd10Smrg
709d0ccd10Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
719d0ccd10Smrg     this time using the binaries in their final installed location.
729d0ccd10Smrg     This target does not install anything.  Running this target as a
739d0ccd10Smrg     regular user, particularly if the prior `make install' required
749d0ccd10Smrg     root privileges, verifies that the installation completed
759d0ccd10Smrg     correctly.
769d0ccd10Smrg
779d0ccd10Smrg  6. You can remove the program binaries and object files from the
787914d74bSmrg     source code directory by typing `make clean'.  To also remove the
797914d74bSmrg     files that `configure' created (so you can compile the package for
807914d74bSmrg     a different kind of computer), type `make distclean'.  There is
817914d74bSmrg     also a `make maintainer-clean' target, but that is intended mainly
827914d74bSmrg     for the package's developers.  If you use it, you may have to get
837914d74bSmrg     all sorts of other programs in order to regenerate files that came
847914d74bSmrg     with the distribution.
857914d74bSmrg
869d0ccd10Smrg  7. Often, you can also type `make uninstall' to remove the installed
879d0ccd10Smrg     files again.  In practice, not all packages have tested that
889d0ccd10Smrg     uninstallation works correctly, even though it is required by the
899d0ccd10Smrg     GNU Coding Standards.
909d0ccd10Smrg
919d0ccd10Smrg  8. Some packages, particularly those that use Automake, provide `make
929d0ccd10Smrg     distcheck', which can by used by developers to test that all other
939d0ccd10Smrg     targets like `make install' and `make uninstall' work correctly.
949d0ccd10Smrg     This target is generally not run by end users.
95e8ead290Smrg
967914d74bSmrgCompilers and Options
977914d74bSmrg=====================
987914d74bSmrg
997914d74bSmrg   Some systems require unusual options for compilation or linking that
1007914d74bSmrgthe `configure' script does not know about.  Run `./configure --help'
1017914d74bSmrgfor details on some of the pertinent environment variables.
1027914d74bSmrg
1037914d74bSmrg   You can give `configure' initial values for configuration parameters
1047914d74bSmrgby setting variables in the command line or in the environment.  Here
1057914d74bSmrgis an example:
1067914d74bSmrg
107e8ead290Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
1087914d74bSmrg
1097914d74bSmrg   *Note Defining Variables::, for more details.
1107914d74bSmrg
1117914d74bSmrgCompiling For Multiple Architectures
1127914d74bSmrg====================================
1137914d74bSmrg
1147914d74bSmrg   You can compile the package for more than one kind of computer at the
1157914d74bSmrgsame time, by placing the object files for each architecture in their
116e8ead290Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
1177914d74bSmrgdirectory where you want the object files and executables to go and run
1187914d74bSmrgthe `configure' script.  `configure' automatically checks for the
1199d0ccd10Smrgsource code in the directory that `configure' is in and in `..'.  This
1209d0ccd10Smrgis known as a "VPATH" build.
1217914d74bSmrg
122e8ead290Smrg   With a non-GNU `make', it is safer to compile the package for one
123e8ead290Smrgarchitecture at a time in the source code directory.  After you have
124e8ead290Smrginstalled the package for one architecture, use `make distclean' before
125e8ead290Smrgreconfiguring for another architecture.
126e8ead290Smrg
127e8ead290Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128e8ead290Smrgexecutables that work on multiple system types--known as "fat" or
129e8ead290Smrg"universal" binaries--by specifying multiple `-arch' options to the
130e8ead290Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131e8ead290Smrgthis:
132e8ead290Smrg
133e8ead290Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134e8ead290Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135e8ead290Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136e8ead290Smrg
137e8ead290Smrg   This is not guaranteed to produce working output in all cases, you
138e8ead290Smrgmay have to build one architecture at a time and combine the results
139e8ead290Smrgusing the `lipo' tool if you have problems.
1407914d74bSmrg
1417914d74bSmrgInstallation Names
1427914d74bSmrg==================
1437914d74bSmrg
144e8ead290Smrg   By default, `make install' installs the package's commands under
145e8ead290Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146e8ead290Smrgcan specify an installation prefix other than `/usr/local' by giving
1479d0ccd10Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1489d0ccd10Smrgabsolute file name.
1497914d74bSmrg
1507914d74bSmrg   You can specify separate installation prefixes for
1517914d74bSmrgarchitecture-specific files and architecture-independent files.  If you
152e8ead290Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153e8ead290SmrgPREFIX as the prefix for installing programs and libraries.
154e8ead290SmrgDocumentation and other data files still use the regular prefix.
1557914d74bSmrg
1567914d74bSmrg   In addition, if you use an unusual directory layout you can give
157e8ead290Smrgoptions like `--bindir=DIR' to specify different values for particular
1587914d74bSmrgkinds of files.  Run `configure --help' for a list of the directories
1599d0ccd10Smrgyou can set and what kinds of files go in them.  In general, the
1609d0ccd10Smrgdefault for these options is expressed in terms of `${prefix}', so that
1619d0ccd10Smrgspecifying just `--prefix' will affect all of the other directory
1629d0ccd10Smrgspecifications that were not explicitly provided.
1639d0ccd10Smrg
1649d0ccd10Smrg   The most portable way to affect installation locations is to pass the
1659d0ccd10Smrgcorrect locations to `configure'; however, many packages provide one or
1669d0ccd10Smrgboth of the following shortcuts of passing variable assignments to the
1679d0ccd10Smrg`make install' command line to change installation locations without
1689d0ccd10Smrghaving to reconfigure or recompile.
1699d0ccd10Smrg
1709d0ccd10Smrg   The first method involves providing an override variable for each
1719d0ccd10Smrgaffected directory.  For example, `make install
1729d0ccd10Smrgprefix=/alternate/directory' will choose an alternate location for all
1739d0ccd10Smrgdirectory configuration variables that were expressed in terms of
1749d0ccd10Smrg`${prefix}'.  Any directories that were specified during `configure',
1759d0ccd10Smrgbut not in terms of `${prefix}', must each be overridden at install
1769d0ccd10Smrgtime for the entire installation to be relocated.  The approach of
1779d0ccd10Smrgmakefile variable overrides for each directory variable is required by
1789d0ccd10Smrgthe GNU Coding Standards, and ideally causes no recompilation.
1799d0ccd10SmrgHowever, some platforms have known limitations with the semantics of
1809d0ccd10Smrgshared libraries that end up requiring recompilation when using this
1819d0ccd10Smrgmethod, particularly noticeable in packages that use GNU Libtool.
1829d0ccd10Smrg
1839d0ccd10Smrg   The second method involves providing the `DESTDIR' variable.  For
1849d0ccd10Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
1859d0ccd10Smrg`/alternate/directory' before all installation names.  The approach of
1869d0ccd10Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1879d0ccd10Smrgdoes not work on platforms that have drive letters.  On the other hand,
1889d0ccd10Smrgit does better at avoiding recompilation issues, and works well even
1899d0ccd10Smrgwhen some directory options were not specified in terms of `${prefix}'
1909d0ccd10Smrgat `configure' time.
1919d0ccd10Smrg
1929d0ccd10SmrgOptional Features
1939d0ccd10Smrg=================
1947914d74bSmrg
1957914d74bSmrg   If the package supports it, you can cause programs to be installed
1967914d74bSmrgwith an extra prefix or suffix on their names by giving `configure' the
1977914d74bSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1987914d74bSmrg
1997914d74bSmrg   Some packages pay attention to `--enable-FEATURE' options to
2007914d74bSmrg`configure', where FEATURE indicates an optional part of the package.
2017914d74bSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
2027914d74bSmrgis something like `gnu-as' or `x' (for the X Window System).  The
2037914d74bSmrg`README' should mention any `--enable-' and `--with-' options that the
2047914d74bSmrgpackage recognizes.
2057914d74bSmrg
2067914d74bSmrg   For packages that use the X Window System, `configure' can usually
2077914d74bSmrgfind the X include and library files automatically, but if it doesn't,
2087914d74bSmrgyou can use the `configure' options `--x-includes=DIR' and
2097914d74bSmrg`--x-libraries=DIR' to specify their locations.
2107914d74bSmrg
2119d0ccd10Smrg   Some packages offer the ability to configure how verbose the
2129d0ccd10Smrgexecution of `make' will be.  For these packages, running `./configure
2139d0ccd10Smrg--enable-silent-rules' sets the default to minimal output, which can be
2149d0ccd10Smrgoverridden with `make V=1'; while running `./configure
2159d0ccd10Smrg--disable-silent-rules' sets the default to verbose, which can be
2169d0ccd10Smrgoverridden with `make V=0'.
2179d0ccd10Smrg
218e8ead290SmrgParticular systems
219e8ead290Smrg==================
220e8ead290Smrg
221e8ead290Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222e8ead290SmrgCC is not installed, it is recommended to use the following options in
223e8ead290Smrgorder to use an ANSI C compiler:
224e8ead290Smrg
2259d0ccd10Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226e8ead290Smrg
227e8ead290Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228e8ead290Smrg
2299d0ccd10Smrg   HP-UX `make' updates targets which have the same time stamps as
2309d0ccd10Smrgtheir prerequisites, which makes it generally unusable when shipped
2319d0ccd10Smrggenerated files such as `configure' are involved.  Use GNU `make'
2329d0ccd10Smrginstead.
2339d0ccd10Smrg
234e8ead290Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235e8ead290Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236e8ead290Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237e8ead290Smrgto try
238e8ead290Smrg
239e8ead290Smrg     ./configure CC="cc"
240e8ead290Smrg
241e8ead290Smrgand if that doesn't work, try
242e8ead290Smrg
243e8ead290Smrg     ./configure CC="cc -nodtk"
244e8ead290Smrg
2459d0ccd10Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2469d0ccd10Smrgdirectory contains several dysfunctional programs; working variants of
2479d0ccd10Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2489d0ccd10Smrgin your `PATH', put it _after_ `/usr/bin'.
2499d0ccd10Smrg
2509d0ccd10Smrg   On Haiku, software installed for all users goes in `/boot/common',
2519d0ccd10Smrgnot `/usr/local'.  It is recommended to use the following options:
2529d0ccd10Smrg
2539d0ccd10Smrg     ./configure --prefix=/boot/common
2549d0ccd10Smrg
2557914d74bSmrgSpecifying the System Type
2567914d74bSmrg==========================
2577914d74bSmrg
2587914d74bSmrg   There may be some features `configure' cannot figure out
2597914d74bSmrgautomatically, but needs to determine by the type of machine the package
2607914d74bSmrgwill run on.  Usually, assuming the package is built to be run on the
2617914d74bSmrg_same_ architectures, `configure' can figure that out, but if it prints
2627914d74bSmrga message saying it cannot guess the machine type, give it the
2637914d74bSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
2647914d74bSmrgtype, such as `sun4', or a canonical name which has the form:
2657914d74bSmrg
2667914d74bSmrg     CPU-COMPANY-SYSTEM
2677914d74bSmrg
2687914d74bSmrgwhere SYSTEM can have one of these forms:
2697914d74bSmrg
2709d0ccd10Smrg     OS
2719d0ccd10Smrg     KERNEL-OS
2727914d74bSmrg
2737914d74bSmrg   See the file `config.sub' for the possible values of each field.  If
2747914d74bSmrg`config.sub' isn't included in this package, then this package doesn't
2757914d74bSmrgneed to know the machine type.
2767914d74bSmrg
2777914d74bSmrg   If you are _building_ compiler tools for cross-compiling, you should
278e8ead290Smrguse the option `--target=TYPE' to select the type of system they will
2797914d74bSmrgproduce code for.
2807914d74bSmrg
2817914d74bSmrg   If you want to _use_ a cross compiler, that generates code for a
2827914d74bSmrgplatform different from the build platform, you should specify the
2837914d74bSmrg"host" platform (i.e., that on which the generated programs will
2847914d74bSmrgeventually be run) with `--host=TYPE'.
2857914d74bSmrg
2867914d74bSmrgSharing Defaults
2877914d74bSmrg================
2887914d74bSmrg
2897914d74bSmrg   If you want to set default values for `configure' scripts to share,
2907914d74bSmrgyou can create a site shell script called `config.site' that gives
2917914d74bSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
2927914d74bSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
2937914d74bSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
2947914d74bSmrg`CONFIG_SITE' environment variable to the location of the site script.
2957914d74bSmrgA warning: not all `configure' scripts look for a site script.
2967914d74bSmrg
2977914d74bSmrgDefining Variables
2987914d74bSmrg==================
2997914d74bSmrg
3007914d74bSmrg   Variables not defined in a site shell script can be set in the
3017914d74bSmrgenvironment passed to `configure'.  However, some packages may run
3027914d74bSmrgconfigure again during the build, and the customized values of these
3037914d74bSmrgvariables may be lost.  In order to avoid this problem, you should set
3047914d74bSmrgthem in the `configure' command line, using `VAR=value'.  For example:
3057914d74bSmrg
3067914d74bSmrg     ./configure CC=/usr/local2/bin/gcc
3077914d74bSmrg
308e8ead290Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
3097914d74bSmrgoverridden in the site shell script).
3107914d74bSmrg
311e8ead290SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312e8ead290Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313e8ead290Smrg
314e8ead290Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315e8ead290Smrg
3167914d74bSmrg`configure' Invocation
3177914d74bSmrg======================
3187914d74bSmrg
3197914d74bSmrg   `configure' recognizes the following options to control how it
3207914d74bSmrgoperates.
3217914d74bSmrg
3227914d74bSmrg`--help'
3237914d74bSmrg`-h'
324e8ead290Smrg     Print a summary of all of the options to `configure', and exit.
325e8ead290Smrg
326e8ead290Smrg`--help=short'
327e8ead290Smrg`--help=recursive'
328e8ead290Smrg     Print a summary of the options unique to this package's
329e8ead290Smrg     `configure', and exit.  The `short' variant lists options used
330e8ead290Smrg     only in the top level, while the `recursive' variant lists options
331e8ead290Smrg     also present in any nested packages.
3327914d74bSmrg
3337914d74bSmrg`--version'
3347914d74bSmrg`-V'
3357914d74bSmrg     Print the version of Autoconf used to generate the `configure'
3367914d74bSmrg     script, and exit.
3377914d74bSmrg
3387914d74bSmrg`--cache-file=FILE'
3397914d74bSmrg     Enable the cache: use and save the results of the tests in FILE,
3407914d74bSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
3417914d74bSmrg     disable caching.
3427914d74bSmrg
3437914d74bSmrg`--config-cache'
3447914d74bSmrg`-C'
3457914d74bSmrg     Alias for `--cache-file=config.cache'.
3467914d74bSmrg
3477914d74bSmrg`--quiet'
3487914d74bSmrg`--silent'
3497914d74bSmrg`-q'
3507914d74bSmrg     Do not print messages saying which checks are being made.  To
3517914d74bSmrg     suppress all normal output, redirect it to `/dev/null' (any error
3527914d74bSmrg     messages will still be shown).
3537914d74bSmrg
3547914d74bSmrg`--srcdir=DIR'
3557914d74bSmrg     Look for the package's source code in directory DIR.  Usually
3567914d74bSmrg     `configure' can determine that directory automatically.
3577914d74bSmrg
358e8ead290Smrg`--prefix=DIR'
3599d0ccd10Smrg     Use DIR as the installation prefix.  *note Installation Names::
360e8ead290Smrg     for more details, including other options available for fine-tuning
361e8ead290Smrg     the installation locations.
362e8ead290Smrg
363e8ead290Smrg`--no-create'
364e8ead290Smrg`-n'
365e8ead290Smrg     Run the configure checks, but stop before creating any output
366e8ead290Smrg     files.
367e8ead290Smrg
3687914d74bSmrg`configure' also accepts some other, not widely useful, options.  Run
3697914d74bSmrg`configure --help' for more details.
3707914d74bSmrg
371