INSTALL revision 79bbd9e8
121ecb1efSmrgInstallation Instructions 221ecb1efSmrg************************* 321ecb1efSmrg 479bbd9e8SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 579bbd9e8SmrgInc. 621ecb1efSmrg 779bbd9e8Smrg Copying and distribution of this file, with or without modification, 879bbd9e8Smrgare permitted in any medium without royalty provided the copyright 979bbd9e8Smrgnotice and this notice are preserved. This file is offered as-is, 1079bbd9e8Smrgwithout warranty of any kind. 1121ecb1efSmrg 1221ecb1efSmrgBasic Installation 1321ecb1efSmrg================== 1421ecb1efSmrg 1521ecb1efSmrg Briefly, the shell commands `./configure; make; make install' should 1621ecb1efSmrgconfigure, build, and install this package. The following 1721ecb1efSmrgmore-detailed instructions are generic; see the `README' file for 1879bbd9e8Smrginstructions specific to this package. Some packages provide this 1979bbd9e8Smrg`INSTALL' file but do not implement all of the features documented 2079bbd9e8Smrgbelow. The lack of an optional feature in a given package is not 2179bbd9e8Smrgnecessarily a bug. More recommendations for GNU packages can be found 2279bbd9e8Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 2321ecb1efSmrg 2421ecb1efSmrg The `configure' shell script attempts to guess correct values for 2521ecb1efSmrgvarious system-dependent variables used during compilation. It uses 2621ecb1efSmrgthose values to create a `Makefile' in each directory of the package. 2721ecb1efSmrgIt may also create one or more `.h' files containing system-dependent 2821ecb1efSmrgdefinitions. Finally, it creates a shell script `config.status' that 2921ecb1efSmrgyou can run in the future to recreate the current configuration, and a 3021ecb1efSmrgfile `config.log' containing compiler output (useful mainly for 3121ecb1efSmrgdebugging `configure'). 3221ecb1efSmrg 3321ecb1efSmrg It can also use an optional file (typically called `config.cache' 3421ecb1efSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 3521ecb1efSmrgthe results of its tests to speed up reconfiguring. Caching is 3621ecb1efSmrgdisabled by default to prevent problems with accidental use of stale 3721ecb1efSmrgcache files. 3821ecb1efSmrg 3921ecb1efSmrg If you need to do unusual things to compile the package, please try 4021ecb1efSmrgto figure out how `configure' could check whether to do them, and mail 4121ecb1efSmrgdiffs or instructions to the address given in the `README' so they can 4221ecb1efSmrgbe considered for the next release. If you are using the cache, and at 4321ecb1efSmrgsome point `config.cache' contains results you don't want to keep, you 4421ecb1efSmrgmay remove or edit it. 4521ecb1efSmrg 4621ecb1efSmrg The file `configure.ac' (or `configure.in') is used to create 4721ecb1efSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 4821ecb1efSmrgyou want to change it or regenerate `configure' using a newer version 4921ecb1efSmrgof `autoconf'. 5021ecb1efSmrg 5179bbd9e8Smrg The simplest way to compile this package is: 5221ecb1efSmrg 5321ecb1efSmrg 1. `cd' to the directory containing the package's source code and type 5421ecb1efSmrg `./configure' to configure the package for your system. 5521ecb1efSmrg 5621ecb1efSmrg Running `configure' might take a while. While running, it prints 5721ecb1efSmrg some messages telling which features it is checking for. 5821ecb1efSmrg 5921ecb1efSmrg 2. Type `make' to compile the package. 6021ecb1efSmrg 6121ecb1efSmrg 3. Optionally, type `make check' to run any self-tests that come with 6279bbd9e8Smrg the package, generally using the just-built uninstalled binaries. 6321ecb1efSmrg 6421ecb1efSmrg 4. Type `make install' to install the programs and any data files and 6579bbd9e8Smrg documentation. When installing into a prefix owned by root, it is 6679bbd9e8Smrg recommended that the package be configured and built as a regular 6779bbd9e8Smrg user, and only the `make install' phase executed with root 6879bbd9e8Smrg privileges. 6979bbd9e8Smrg 7079bbd9e8Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 7179bbd9e8Smrg this time using the binaries in their final installed location. 7279bbd9e8Smrg This target does not install anything. Running this target as a 7379bbd9e8Smrg regular user, particularly if the prior `make install' required 7479bbd9e8Smrg root privileges, verifies that the installation completed 7579bbd9e8Smrg correctly. 7679bbd9e8Smrg 7779bbd9e8Smrg 6. You can remove the program binaries and object files from the 7821ecb1efSmrg source code directory by typing `make clean'. To also remove the 7921ecb1efSmrg files that `configure' created (so you can compile the package for 8021ecb1efSmrg a different kind of computer), type `make distclean'. There is 8121ecb1efSmrg also a `make maintainer-clean' target, but that is intended mainly 8221ecb1efSmrg for the package's developers. If you use it, you may have to get 8321ecb1efSmrg all sorts of other programs in order to regenerate files that came 8421ecb1efSmrg with the distribution. 8521ecb1efSmrg 8679bbd9e8Smrg 7. Often, you can also type `make uninstall' to remove the installed 8779bbd9e8Smrg files again. In practice, not all packages have tested that 8879bbd9e8Smrg uninstallation works correctly, even though it is required by the 8979bbd9e8Smrg GNU Coding Standards. 9079bbd9e8Smrg 9179bbd9e8Smrg 8. Some packages, particularly those that use Automake, provide `make 9279bbd9e8Smrg distcheck', which can by used by developers to test that all other 9379bbd9e8Smrg targets like `make install' and `make uninstall' work correctly. 9479bbd9e8Smrg This target is generally not run by end users. 9521ecb1efSmrg 9621ecb1efSmrgCompilers and Options 9721ecb1efSmrg===================== 9821ecb1efSmrg 9921ecb1efSmrg Some systems require unusual options for compilation or linking that 10021ecb1efSmrgthe `configure' script does not know about. Run `./configure --help' 10121ecb1efSmrgfor details on some of the pertinent environment variables. 10221ecb1efSmrg 10321ecb1efSmrg You can give `configure' initial values for configuration parameters 10421ecb1efSmrgby setting variables in the command line or in the environment. Here 10521ecb1efSmrgis an example: 10621ecb1efSmrg 10721ecb1efSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 10821ecb1efSmrg 10921ecb1efSmrg *Note Defining Variables::, for more details. 11021ecb1efSmrg 11121ecb1efSmrgCompiling For Multiple Architectures 11221ecb1efSmrg==================================== 11321ecb1efSmrg 11421ecb1efSmrg You can compile the package for more than one kind of computer at the 11521ecb1efSmrgsame time, by placing the object files for each architecture in their 11621ecb1efSmrgown directory. To do this, you can use GNU `make'. `cd' to the 11721ecb1efSmrgdirectory where you want the object files and executables to go and run 11821ecb1efSmrgthe `configure' script. `configure' automatically checks for the 11979bbd9e8Smrgsource code in the directory that `configure' is in and in `..'. This 12079bbd9e8Smrgis known as a "VPATH" build. 12121ecb1efSmrg 12221ecb1efSmrg With a non-GNU `make', it is safer to compile the package for one 12321ecb1efSmrgarchitecture at a time in the source code directory. After you have 12421ecb1efSmrginstalled the package for one architecture, use `make distclean' before 12521ecb1efSmrgreconfiguring for another architecture. 12621ecb1efSmrg 12721ecb1efSmrg On MacOS X 10.5 and later systems, you can create libraries and 12821ecb1efSmrgexecutables that work on multiple system types--known as "fat" or 12921ecb1efSmrg"universal" binaries--by specifying multiple `-arch' options to the 13021ecb1efSmrgcompiler but only a single `-arch' option to the preprocessor. Like 13121ecb1efSmrgthis: 13221ecb1efSmrg 13321ecb1efSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13421ecb1efSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13521ecb1efSmrg CPP="gcc -E" CXXCPP="g++ -E" 13621ecb1efSmrg 13721ecb1efSmrg This is not guaranteed to produce working output in all cases, you 13821ecb1efSmrgmay have to build one architecture at a time and combine the results 13921ecb1efSmrgusing the `lipo' tool if you have problems. 14021ecb1efSmrg 14121ecb1efSmrgInstallation Names 14221ecb1efSmrg================== 14321ecb1efSmrg 14421ecb1efSmrg By default, `make install' installs the package's commands under 14521ecb1efSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14621ecb1efSmrgcan specify an installation prefix other than `/usr/local' by giving 14779bbd9e8Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 14879bbd9e8Smrgabsolute file name. 14921ecb1efSmrg 15021ecb1efSmrg You can specify separate installation prefixes for 15121ecb1efSmrgarchitecture-specific files and architecture-independent files. If you 15221ecb1efSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15321ecb1efSmrgPREFIX as the prefix for installing programs and libraries. 15421ecb1efSmrgDocumentation and other data files still use the regular prefix. 15521ecb1efSmrg 15621ecb1efSmrg In addition, if you use an unusual directory layout you can give 15721ecb1efSmrgoptions like `--bindir=DIR' to specify different values for particular 15821ecb1efSmrgkinds of files. Run `configure --help' for a list of the directories 15979bbd9e8Smrgyou can set and what kinds of files go in them. In general, the 16079bbd9e8Smrgdefault for these options is expressed in terms of `${prefix}', so that 16179bbd9e8Smrgspecifying just `--prefix' will affect all of the other directory 16279bbd9e8Smrgspecifications that were not explicitly provided. 16379bbd9e8Smrg 16479bbd9e8Smrg The most portable way to affect installation locations is to pass the 16579bbd9e8Smrgcorrect locations to `configure'; however, many packages provide one or 16679bbd9e8Smrgboth of the following shortcuts of passing variable assignments to the 16779bbd9e8Smrg`make install' command line to change installation locations without 16879bbd9e8Smrghaving to reconfigure or recompile. 16979bbd9e8Smrg 17079bbd9e8Smrg The first method involves providing an override variable for each 17179bbd9e8Smrgaffected directory. For example, `make install 17279bbd9e8Smrgprefix=/alternate/directory' will choose an alternate location for all 17379bbd9e8Smrgdirectory configuration variables that were expressed in terms of 17479bbd9e8Smrg`${prefix}'. Any directories that were specified during `configure', 17579bbd9e8Smrgbut not in terms of `${prefix}', must each be overridden at install 17679bbd9e8Smrgtime for the entire installation to be relocated. The approach of 17779bbd9e8Smrgmakefile variable overrides for each directory variable is required by 17879bbd9e8Smrgthe GNU Coding Standards, and ideally causes no recompilation. 17979bbd9e8SmrgHowever, some platforms have known limitations with the semantics of 18079bbd9e8Smrgshared libraries that end up requiring recompilation when using this 18179bbd9e8Smrgmethod, particularly noticeable in packages that use GNU Libtool. 18279bbd9e8Smrg 18379bbd9e8Smrg The second method involves providing the `DESTDIR' variable. For 18479bbd9e8Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 18579bbd9e8Smrg`/alternate/directory' before all installation names. The approach of 18679bbd9e8Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 18779bbd9e8Smrgdoes not work on platforms that have drive letters. On the other hand, 18879bbd9e8Smrgit does better at avoiding recompilation issues, and works well even 18979bbd9e8Smrgwhen some directory options were not specified in terms of `${prefix}' 19079bbd9e8Smrgat `configure' time. 19179bbd9e8Smrg 19279bbd9e8SmrgOptional Features 19379bbd9e8Smrg================= 19421ecb1efSmrg 19521ecb1efSmrg If the package supports it, you can cause programs to be installed 19621ecb1efSmrgwith an extra prefix or suffix on their names by giving `configure' the 19721ecb1efSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 19821ecb1efSmrg 19921ecb1efSmrg Some packages pay attention to `--enable-FEATURE' options to 20021ecb1efSmrg`configure', where FEATURE indicates an optional part of the package. 20121ecb1efSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 20221ecb1efSmrgis something like `gnu-as' or `x' (for the X Window System). The 20321ecb1efSmrg`README' should mention any `--enable-' and `--with-' options that the 20421ecb1efSmrgpackage recognizes. 20521ecb1efSmrg 20621ecb1efSmrg For packages that use the X Window System, `configure' can usually 20721ecb1efSmrgfind the X include and library files automatically, but if it doesn't, 20821ecb1efSmrgyou can use the `configure' options `--x-includes=DIR' and 20921ecb1efSmrg`--x-libraries=DIR' to specify their locations. 21021ecb1efSmrg 21179bbd9e8Smrg Some packages offer the ability to configure how verbose the 21279bbd9e8Smrgexecution of `make' will be. For these packages, running `./configure 21379bbd9e8Smrg--enable-silent-rules' sets the default to minimal output, which can be 21479bbd9e8Smrgoverridden with `make V=1'; while running `./configure 21579bbd9e8Smrg--disable-silent-rules' sets the default to verbose, which can be 21679bbd9e8Smrgoverridden with `make V=0'. 21779bbd9e8Smrg 21821ecb1efSmrgParticular systems 21921ecb1efSmrg================== 22021ecb1efSmrg 22121ecb1efSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 22221ecb1efSmrgCC is not installed, it is recommended to use the following options in 22321ecb1efSmrgorder to use an ANSI C compiler: 22421ecb1efSmrg 22579bbd9e8Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 22621ecb1efSmrg 22721ecb1efSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 22821ecb1efSmrg 22979bbd9e8Smrg HP-UX `make' updates targets which have the same time stamps as 23079bbd9e8Smrgtheir prerequisites, which makes it generally unusable when shipped 23179bbd9e8Smrggenerated files such as `configure' are involved. Use GNU `make' 23279bbd9e8Smrginstead. 23379bbd9e8Smrg 23421ecb1efSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 23521ecb1efSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 23621ecb1efSmrga workaround. If GNU CC is not installed, it is therefore recommended 23721ecb1efSmrgto try 23821ecb1efSmrg 23921ecb1efSmrg ./configure CC="cc" 24021ecb1efSmrg 24121ecb1efSmrgand if that doesn't work, try 24221ecb1efSmrg 24321ecb1efSmrg ./configure CC="cc -nodtk" 24421ecb1efSmrg 24579bbd9e8Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 24679bbd9e8Smrgdirectory contains several dysfunctional programs; working variants of 24779bbd9e8Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 24879bbd9e8Smrgin your `PATH', put it _after_ `/usr/bin'. 24979bbd9e8Smrg 25079bbd9e8Smrg On Haiku, software installed for all users goes in `/boot/common', 25179bbd9e8Smrgnot `/usr/local'. It is recommended to use the following options: 25279bbd9e8Smrg 25379bbd9e8Smrg ./configure --prefix=/boot/common 25479bbd9e8Smrg 25521ecb1efSmrgSpecifying the System Type 25621ecb1efSmrg========================== 25721ecb1efSmrg 25821ecb1efSmrg There may be some features `configure' cannot figure out 25921ecb1efSmrgautomatically, but needs to determine by the type of machine the package 26021ecb1efSmrgwill run on. Usually, assuming the package is built to be run on the 26121ecb1efSmrg_same_ architectures, `configure' can figure that out, but if it prints 26221ecb1efSmrga message saying it cannot guess the machine type, give it the 26321ecb1efSmrg`--build=TYPE' option. TYPE can either be a short name for the system 26421ecb1efSmrgtype, such as `sun4', or a canonical name which has the form: 26521ecb1efSmrg 26621ecb1efSmrg CPU-COMPANY-SYSTEM 26721ecb1efSmrg 26821ecb1efSmrgwhere SYSTEM can have one of these forms: 26921ecb1efSmrg 27079bbd9e8Smrg OS 27179bbd9e8Smrg KERNEL-OS 27221ecb1efSmrg 27321ecb1efSmrg See the file `config.sub' for the possible values of each field. If 27421ecb1efSmrg`config.sub' isn't included in this package, then this package doesn't 27521ecb1efSmrgneed to know the machine type. 27621ecb1efSmrg 27721ecb1efSmrg If you are _building_ compiler tools for cross-compiling, you should 27821ecb1efSmrguse the option `--target=TYPE' to select the type of system they will 27921ecb1efSmrgproduce code for. 28021ecb1efSmrg 28121ecb1efSmrg If you want to _use_ a cross compiler, that generates code for a 28221ecb1efSmrgplatform different from the build platform, you should specify the 28321ecb1efSmrg"host" platform (i.e., that on which the generated programs will 28421ecb1efSmrgeventually be run) with `--host=TYPE'. 28521ecb1efSmrg 28621ecb1efSmrgSharing Defaults 28721ecb1efSmrg================ 28821ecb1efSmrg 28921ecb1efSmrg If you want to set default values for `configure' scripts to share, 29021ecb1efSmrgyou can create a site shell script called `config.site' that gives 29121ecb1efSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 29221ecb1efSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 29321ecb1efSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 29421ecb1efSmrg`CONFIG_SITE' environment variable to the location of the site script. 29521ecb1efSmrgA warning: not all `configure' scripts look for a site script. 29621ecb1efSmrg 29721ecb1efSmrgDefining Variables 29821ecb1efSmrg================== 29921ecb1efSmrg 30021ecb1efSmrg Variables not defined in a site shell script can be set in the 30121ecb1efSmrgenvironment passed to `configure'. However, some packages may run 30221ecb1efSmrgconfigure again during the build, and the customized values of these 30321ecb1efSmrgvariables may be lost. In order to avoid this problem, you should set 30421ecb1efSmrgthem in the `configure' command line, using `VAR=value'. For example: 30521ecb1efSmrg 30621ecb1efSmrg ./configure CC=/usr/local2/bin/gcc 30721ecb1efSmrg 30821ecb1efSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 30921ecb1efSmrgoverridden in the site shell script). 31021ecb1efSmrg 31121ecb1efSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 31221ecb1efSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 31321ecb1efSmrg 31421ecb1efSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 31521ecb1efSmrg 31621ecb1efSmrg`configure' Invocation 31721ecb1efSmrg====================== 31821ecb1efSmrg 31921ecb1efSmrg `configure' recognizes the following options to control how it 32021ecb1efSmrgoperates. 32121ecb1efSmrg 32221ecb1efSmrg`--help' 32321ecb1efSmrg`-h' 32421ecb1efSmrg Print a summary of all of the options to `configure', and exit. 32521ecb1efSmrg 32621ecb1efSmrg`--help=short' 32721ecb1efSmrg`--help=recursive' 32821ecb1efSmrg Print a summary of the options unique to this package's 32921ecb1efSmrg `configure', and exit. The `short' variant lists options used 33021ecb1efSmrg only in the top level, while the `recursive' variant lists options 33121ecb1efSmrg also present in any nested packages. 33221ecb1efSmrg 33321ecb1efSmrg`--version' 33421ecb1efSmrg`-V' 33521ecb1efSmrg Print the version of Autoconf used to generate the `configure' 33621ecb1efSmrg script, and exit. 33721ecb1efSmrg 33821ecb1efSmrg`--cache-file=FILE' 33921ecb1efSmrg Enable the cache: use and save the results of the tests in FILE, 34021ecb1efSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 34121ecb1efSmrg disable caching. 34221ecb1efSmrg 34321ecb1efSmrg`--config-cache' 34421ecb1efSmrg`-C' 34521ecb1efSmrg Alias for `--cache-file=config.cache'. 34621ecb1efSmrg 34721ecb1efSmrg`--quiet' 34821ecb1efSmrg`--silent' 34921ecb1efSmrg`-q' 35021ecb1efSmrg Do not print messages saying which checks are being made. To 35121ecb1efSmrg suppress all normal output, redirect it to `/dev/null' (any error 35221ecb1efSmrg messages will still be shown). 35321ecb1efSmrg 35421ecb1efSmrg`--srcdir=DIR' 35521ecb1efSmrg Look for the package's source code in directory DIR. Usually 35621ecb1efSmrg `configure' can determine that directory automatically. 35721ecb1efSmrg 35821ecb1efSmrg`--prefix=DIR' 35979bbd9e8Smrg Use DIR as the installation prefix. *note Installation Names:: 36021ecb1efSmrg for more details, including other options available for fine-tuning 36121ecb1efSmrg the installation locations. 36221ecb1efSmrg 36321ecb1efSmrg`--no-create' 36421ecb1efSmrg`-n' 36521ecb1efSmrg Run the configure checks, but stop before creating any output 36621ecb1efSmrg files. 36721ecb1efSmrg 36821ecb1efSmrg`configure' also accepts some other, not widely useful, options. Run 36921ecb1efSmrg`configure --help' for more details. 37021ecb1efSmrg 371