ali@0: Installation Instructions ali@0: ************************* ali@0: ali@0: Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, ali@0: 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ali@0: ali@0: Copying and distribution of this file, with or without modification, ali@0: are permitted in any medium without royalty provided the copyright ali@0: notice and this notice are preserved. This file is offered as-is, ali@0: without warranty of any kind. ali@0: ali@0: Basic Installation ali@0: ================== ali@0: ali@0: Briefly, the shell commands `./configure; make; make install' should ali@0: configure, build, and install this package. The following ali@0: more-detailed instructions are generic; see the `README' file for ali@0: instructions specific to this package. Some packages provide this ali@0: `INSTALL' file but do not implement all of the features documented ali@0: below. The lack of an optional feature in a given package is not ali@0: necessarily a bug. More recommendations for GNU packages can be found ali@0: in *note Makefile Conventions: (standards)Makefile Conventions. ali@0: ali@0: The `configure' shell script attempts to guess correct values for ali@0: various system-dependent variables used during compilation. It uses ali@0: those values to create a `Makefile' in each directory of the package. ali@0: It may also create one or more `.h' files containing system-dependent ali@0: definitions. Finally, it creates a shell script `config.status' that ali@0: you can run in the future to recreate the current configuration, and a ali@0: file `config.log' containing compiler output (useful mainly for ali@0: debugging `configure'). ali@0: ali@0: It can also use an optional file (typically called `config.cache' ali@0: and enabled with `--cache-file=config.cache' or simply `-C') that saves ali@0: the results of its tests to speed up reconfiguring. Caching is ali@0: disabled by default to prevent problems with accidental use of stale ali@0: cache files. ali@0: ali@0: If you need to do unusual things to compile the package, please try ali@0: to figure out how `configure' could check whether to do them, and mail ali@0: diffs or instructions to the address given in the `README' so they can ali@0: be considered for the next release. If you are using the cache, and at ali@0: some point `config.cache' contains results you don't want to keep, you ali@0: may remove or edit it. ali@0: ali@0: The file `configure.ac' (or `configure.in') is used to create ali@0: `configure' by a program called `autoconf'. You need `configure.ac' if ali@0: you want to change it or regenerate `configure' using a newer version ali@0: of `autoconf'. ali@0: ali@0: The simplest way to compile this package is: ali@0: ali@0: 1. `cd' to the directory containing the package's source code and type ali@0: `./configure' to configure the package for your system. ali@0: ali@0: Running `configure' might take a while. While running, it prints ali@0: some messages telling which features it is checking for. ali@0: ali@0: 2. Type `make' to compile the package. ali@0: ali@0: 3. Optionally, type `make check' to run any self-tests that come with ali@0: the package, generally using the just-built uninstalled binaries. ali@0: ali@0: 4. Type `make install' to install the programs and any data files and ali@0: documentation. When installing into a prefix owned by root, it is ali@0: recommended that the package be configured and built as a regular ali@0: user, and only the `make install' phase executed with root ali@0: privileges. ali@0: ali@0: 5. Optionally, type `make installcheck' to repeat any self-tests, but ali@0: this time using the binaries in their final installed location. ali@0: This target does not install anything. Running this target as a ali@0: regular user, particularly if the prior `make install' required ali@0: root privileges, verifies that the installation completed ali@0: correctly. ali@0: ali@0: 6. You can remove the program binaries and object files from the ali@0: source code directory by typing `make clean'. To also remove the ali@0: files that `configure' created (so you can compile the package for ali@0: a different kind of computer), type `make distclean'. There is ali@0: also a `make maintainer-clean' target, but that is intended mainly ali@0: for the package's developers. If you use it, you may have to get ali@0: all sorts of other programs in order to regenerate files that came ali@0: with the distribution. ali@0: ali@0: 7. Often, you can also type `make uninstall' to remove the installed ali@0: files again. In practice, not all packages have tested that ali@0: uninstallation works correctly, even though it is required by the ali@0: GNU Coding Standards. ali@0: ali@0: 8. Some packages, particularly those that use Automake, provide `make ali@0: distcheck', which can by used by developers to test that all other ali@0: targets like `make install' and `make uninstall' work correctly. ali@0: This target is generally not run by end users. ali@0: ali@0: Compilers and Options ali@0: ===================== ali@0: ali@0: Some systems require unusual options for compilation or linking that ali@0: the `configure' script does not know about. Run `./configure --help' ali@0: for details on some of the pertinent environment variables. ali@0: ali@0: You can give `configure' initial values for configuration parameters ali@0: by setting variables in the command line or in the environment. Here ali@0: is an example: ali@0: ali@0: ./configure CC=c99 CFLAGS=-g LIBS=-lposix ali@0: ali@0: *Note Defining Variables::, for more details. ali@0: ali@0: Compiling For Multiple Architectures ali@0: ==================================== ali@0: ali@0: You can compile the package for more than one kind of computer at the ali@0: same time, by placing the object files for each architecture in their ali@0: own directory. To do this, you can use GNU `make'. `cd' to the ali@0: directory where you want the object files and executables to go and run ali@0: the `configure' script. `configure' automatically checks for the ali@0: source code in the directory that `configure' is in and in `..'. This ali@0: is known as a "VPATH" build. ali@0: ali@0: With a non-GNU `make', it is safer to compile the package for one ali@0: architecture at a time in the source code directory. After you have ali@0: installed the package for one architecture, use `make distclean' before ali@0: reconfiguring for another architecture. ali@0: ali@0: On MacOS X 10.5 and later systems, you can create libraries and ali@0: executables that work on multiple system types--known as "fat" or ali@0: "universal" binaries--by specifying multiple `-arch' options to the ali@0: compiler but only a single `-arch' option to the preprocessor. Like ali@0: this: ali@0: ali@0: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ ali@0: CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ ali@0: CPP="gcc -E" CXXCPP="g++ -E" ali@0: ali@0: This is not guaranteed to produce working output in all cases, you ali@0: may have to build one architecture at a time and combine the results ali@0: using the `lipo' tool if you have problems. ali@0: ali@0: Installation Names ali@0: ================== ali@0: ali@0: By default, `make install' installs the package's commands under ali@0: `/usr/local/bin', include files under `/usr/local/include', etc. You ali@0: can specify an installation prefix other than `/usr/local' by giving ali@0: `configure' the option `--prefix=PREFIX', where PREFIX must be an ali@0: absolute file name. ali@0: ali@0: You can specify separate installation prefixes for ali@0: architecture-specific files and architecture-independent files. If you ali@0: pass the option `--exec-prefix=PREFIX' to `configure', the package uses ali@0: PREFIX as the prefix for installing programs and libraries. ali@0: Documentation and other data files still use the regular prefix. ali@0: ali@0: In addition, if you use an unusual directory layout you can give ali@0: options like `--bindir=DIR' to specify different values for particular ali@0: kinds of files. Run `configure --help' for a list of the directories ali@0: you can set and what kinds of files go in them. In general, the ali@0: default for these options is expressed in terms of `${prefix}', so that ali@0: specifying just `--prefix' will affect all of the other directory ali@0: specifications that were not explicitly provided. ali@0: ali@0: The most portable way to affect installation locations is to pass the ali@0: correct locations to `configure'; however, many packages provide one or ali@0: both of the following shortcuts of passing variable assignments to the ali@0: `make install' command line to change installation locations without ali@0: having to reconfigure or recompile. ali@0: ali@0: The first method involves providing an override variable for each ali@0: affected directory. For example, `make install ali@0: prefix=/alternate/directory' will choose an alternate location for all ali@0: directory configuration variables that were expressed in terms of ali@0: `${prefix}'. Any directories that were specified during `configure', ali@0: but not in terms of `${prefix}', must each be overridden at install ali@0: time for the entire installation to be relocated. The approach of ali@0: makefile variable overrides for each directory variable is required by ali@0: the GNU Coding Standards, and ideally causes no recompilation. ali@0: However, some platforms have known limitations with the semantics of ali@0: shared libraries that end up requiring recompilation when using this ali@0: method, particularly noticeable in packages that use GNU Libtool. ali@0: ali@0: The second method involves providing the `DESTDIR' variable. For ali@0: example, `make install DESTDIR=/alternate/directory' will prepend ali@0: `/alternate/directory' before all installation names. The approach of ali@0: `DESTDIR' overrides is not required by the GNU Coding Standards, and ali@0: does not work on platforms that have drive letters. On the other hand, ali@0: it does better at avoiding recompilation issues, and works well even ali@0: when some directory options were not specified in terms of `${prefix}' ali@0: at `configure' time. ali@0: ali@0: Optional Features ali@0: ================= ali@0: ali@0: If the package supports it, you can cause programs to be installed ali@0: with an extra prefix or suffix on their names by giving `configure' the ali@0: option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. ali@0: ali@0: Some packages pay attention to `--enable-FEATURE' options to ali@0: `configure', where FEATURE indicates an optional part of the package. ali@0: They may also pay attention to `--with-PACKAGE' options, where PACKAGE ali@0: is something like `gnu-as' or `x' (for the X Window System). The ali@0: `README' should mention any `--enable-' and `--with-' options that the ali@0: package recognizes. ali@0: ali@0: For packages that use the X Window System, `configure' can usually ali@0: find the X include and library files automatically, but if it doesn't, ali@0: you can use the `configure' options `--x-includes=DIR' and ali@0: `--x-libraries=DIR' to specify their locations. ali@0: ali@0: Some packages offer the ability to configure how verbose the ali@0: execution of `make' will be. For these packages, running `./configure ali@0: --enable-silent-rules' sets the default to minimal output, which can be ali@0: overridden with `make V=1'; while running `./configure ali@0: --disable-silent-rules' sets the default to verbose, which can be ali@0: overridden with `make V=0'. ali@0: ali@0: Particular systems ali@0: ================== ali@0: ali@0: On HP-UX, the default C compiler is not ANSI C compatible. If GNU ali@0: CC is not installed, it is recommended to use the following options in ali@0: order to use an ANSI C compiler: ali@0: ali@0: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" ali@0: ali@0: and if that doesn't work, install pre-built binaries of GCC for HP-UX. ali@0: ali@0: On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot ali@0: parse its `' header file. The option `-nodtk' can be used as ali@0: a workaround. If GNU CC is not installed, it is therefore recommended ali@0: to try ali@0: ali@0: ./configure CC="cc" ali@0: ali@0: and if that doesn't work, try ali@0: ali@0: ./configure CC="cc -nodtk" ali@0: ali@0: On Solaris, don't put `/usr/ucb' early in your `PATH'. This ali@0: directory contains several dysfunctional programs; working variants of ali@0: these programs are available in `/usr/bin'. So, if you need `/usr/ucb' ali@0: in your `PATH', put it _after_ `/usr/bin'. ali@0: ali@0: On Haiku, software installed for all users goes in `/boot/common', ali@0: not `/usr/local'. It is recommended to use the following options: ali@0: ali@0: ./configure --prefix=/boot/common ali@0: ali@0: Specifying the System Type ali@0: ========================== ali@0: ali@0: There may be some features `configure' cannot figure out ali@0: automatically, but needs to determine by the type of machine the package ali@0: will run on. Usually, assuming the package is built to be run on the ali@0: _same_ architectures, `configure' can figure that out, but if it prints ali@0: a message saying it cannot guess the machine type, give it the ali@0: `--build=TYPE' option. TYPE can either be a short name for the system ali@0: type, such as `sun4', or a canonical name which has the form: ali@0: ali@0: CPU-COMPANY-SYSTEM ali@0: ali@0: where SYSTEM can have one of these forms: ali@0: ali@0: OS ali@0: KERNEL-OS ali@0: ali@0: See the file `config.sub' for the possible values of each field. If ali@0: `config.sub' isn't included in this package, then this package doesn't ali@0: need to know the machine type. ali@0: ali@0: If you are _building_ compiler tools for cross-compiling, you should ali@0: use the option `--target=TYPE' to select the type of system they will ali@0: produce code for. ali@0: ali@0: If you want to _use_ a cross compiler, that generates code for a ali@0: platform different from the build platform, you should specify the ali@0: "host" platform (i.e., that on which the generated programs will ali@0: eventually be run) with `--host=TYPE'. ali@0: ali@0: Sharing Defaults ali@0: ================ ali@0: ali@0: If you want to set default values for `configure' scripts to share, ali@0: you can create a site shell script called `config.site' that gives ali@0: default values for variables like `CC', `cache_file', and `prefix'. ali@0: `configure' looks for `PREFIX/share/config.site' if it exists, then ali@0: `PREFIX/etc/config.site' if it exists. Or, you can set the ali@0: `CONFIG_SITE' environment variable to the location of the site script. ali@0: A warning: not all `configure' scripts look for a site script. ali@0: ali@0: Defining Variables ali@0: ================== ali@0: ali@0: Variables not defined in a site shell script can be set in the ali@0: environment passed to `configure'. However, some packages may run ali@0: configure again during the build, and the customized values of these ali@0: variables may be lost. In order to avoid this problem, you should set ali@0: them in the `configure' command line, using `VAR=value'. For example: ali@0: ali@0: ./configure CC=/usr/local2/bin/gcc ali@0: ali@0: causes the specified `gcc' to be used as the C compiler (unless it is ali@0: overridden in the site shell script). ali@0: ali@0: Unfortunately, this technique does not work for `CONFIG_SHELL' due to ali@0: an Autoconf bug. Until the bug is fixed you can use this workaround: ali@0: ali@0: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash ali@0: ali@0: `configure' Invocation ali@0: ====================== ali@0: ali@0: `configure' recognizes the following options to control how it ali@0: operates. ali@0: ali@0: `--help' ali@0: `-h' ali@0: Print a summary of all of the options to `configure', and exit. ali@0: ali@0: `--help=short' ali@0: `--help=recursive' ali@0: Print a summary of the options unique to this package's ali@0: `configure', and exit. The `short' variant lists options used ali@0: only in the top level, while the `recursive' variant lists options ali@0: also present in any nested packages. ali@0: ali@0: `--version' ali@0: `-V' ali@0: Print the version of Autoconf used to generate the `configure' ali@0: script, and exit. ali@0: ali@0: `--cache-file=FILE' ali@0: Enable the cache: use and save the results of the tests in FILE, ali@0: traditionally `config.cache'. FILE defaults to `/dev/null' to ali@0: disable caching. ali@0: ali@0: `--config-cache' ali@0: `-C' ali@0: Alias for `--cache-file=config.cache'. ali@0: ali@0: `--quiet' ali@0: `--silent' ali@0: `-q' ali@0: Do not print messages saying which checks are being made. To ali@0: suppress all normal output, redirect it to `/dev/null' (any error ali@0: messages will still be shown). ali@0: ali@0: `--srcdir=DIR' ali@0: Look for the package's source code in directory DIR. Usually ali@0: `configure' can determine that directory automatically. ali@0: ali@0: `--prefix=DIR' ali@0: Use DIR as the installation prefix. *note Installation Names:: ali@0: for more details, including other options available for fine-tuning ali@0: the installation locations. ali@0: ali@0: `--no-create' ali@0: `-n' ali@0: Run the configure checks, but stop before creating any output ali@0: files. ali@0: ali@0: `configure' also accepts some other, not widely useful, options. Run ali@0: `configure --help' for more details. ali@0: