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