INSTALL revision e9feffd0
144d7874bSmrgInstallation Instructions 244d7874bSmrg************************* 344d7874bSmrg 4e9feffd0SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5e9feffd0SmrgInc. 644d7874bSmrg 7e9feffd0Smrg Copying and distribution of this file, with or without modification, 8e9feffd0Smrgare permitted in any medium without royalty provided the copyright 9e9feffd0Smrgnotice and this notice are preserved. This file is offered as-is, 10e9feffd0Smrgwithout warranty of any kind. 1144d7874bSmrg 1244d7874bSmrgBasic Installation 1344d7874bSmrg================== 1444d7874bSmrg 152d861bc5Smrg Briefly, the shell commands `./configure; make; make install' should 162d861bc5Smrgconfigure, build, and install this package. The following 172d861bc5Smrgmore-detailed instructions are generic; see the `README' file for 18e9feffd0Smrginstructions specific to this package. Some packages provide this 19e9feffd0Smrg`INSTALL' file but do not implement all of the features documented 20e9feffd0Smrgbelow. The lack of an optional feature in a given package is not 21e9feffd0Smrgnecessarily a bug. More recommendations for GNU packages can be found 22e9feffd0Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 2344d7874bSmrg 2444d7874bSmrg The `configure' shell script attempts to guess correct values for 2544d7874bSmrgvarious system-dependent variables used during compilation. It uses 2644d7874bSmrgthose values to create a `Makefile' in each directory of the package. 2744d7874bSmrgIt may also create one or more `.h' files containing system-dependent 2844d7874bSmrgdefinitions. Finally, it creates a shell script `config.status' that 2944d7874bSmrgyou can run in the future to recreate the current configuration, and a 3044d7874bSmrgfile `config.log' containing compiler output (useful mainly for 3144d7874bSmrgdebugging `configure'). 3244d7874bSmrg 3344d7874bSmrg It can also use an optional file (typically called `config.cache' 3444d7874bSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 352d861bc5Smrgthe results of its tests to speed up reconfiguring. Caching is 3644d7874bSmrgdisabled by default to prevent problems with accidental use of stale 372d861bc5Smrgcache files. 3844d7874bSmrg 3944d7874bSmrg If you need to do unusual things to compile the package, please try 4044d7874bSmrgto figure out how `configure' could check whether to do them, and mail 4144d7874bSmrgdiffs or instructions to the address given in the `README' so they can 4244d7874bSmrgbe considered for the next release. If you are using the cache, and at 4344d7874bSmrgsome point `config.cache' contains results you don't want to keep, you 4444d7874bSmrgmay remove or edit it. 4544d7874bSmrg 4644d7874bSmrg The file `configure.ac' (or `configure.in') is used to create 472d861bc5Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 482d861bc5Smrgyou want to change it or regenerate `configure' using a newer version 492d861bc5Smrgof `autoconf'. 5044d7874bSmrg 51e9feffd0Smrg The simplest way to compile this package is: 5244d7874bSmrg 5344d7874bSmrg 1. `cd' to the directory containing the package's source code and type 542d861bc5Smrg `./configure' to configure the package for your system. 5544d7874bSmrg 562d861bc5Smrg Running `configure' might take a while. While running, it prints 572d861bc5Smrg some messages telling which features it is checking for. 5844d7874bSmrg 5944d7874bSmrg 2. Type `make' to compile the package. 6044d7874bSmrg 6144d7874bSmrg 3. Optionally, type `make check' to run any self-tests that come with 62e9feffd0Smrg the package, generally using the just-built uninstalled binaries. 6344d7874bSmrg 6444d7874bSmrg 4. Type `make install' to install the programs and any data files and 65e9feffd0Smrg documentation. When installing into a prefix owned by root, it is 66e9feffd0Smrg recommended that the package be configured and built as a regular 67e9feffd0Smrg user, and only the `make install' phase executed with root 68e9feffd0Smrg privileges. 69e9feffd0Smrg 70e9feffd0Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71e9feffd0Smrg this time using the binaries in their final installed location. 72e9feffd0Smrg This target does not install anything. Running this target as a 73e9feffd0Smrg regular user, particularly if the prior `make install' required 74e9feffd0Smrg root privileges, verifies that the installation completed 75e9feffd0Smrg correctly. 76e9feffd0Smrg 77e9feffd0Smrg 6. You can remove the program binaries and object files from the 7844d7874bSmrg source code directory by typing `make clean'. To also remove the 7944d7874bSmrg files that `configure' created (so you can compile the package for 8044d7874bSmrg a different kind of computer), type `make distclean'. There is 8144d7874bSmrg also a `make maintainer-clean' target, but that is intended mainly 8244d7874bSmrg for the package's developers. If you use it, you may have to get 8344d7874bSmrg all sorts of other programs in order to regenerate files that came 8444d7874bSmrg with the distribution. 8544d7874bSmrg 86e9feffd0Smrg 7. Often, you can also type `make uninstall' to remove the installed 87e9feffd0Smrg files again. In practice, not all packages have tested that 88e9feffd0Smrg uninstallation works correctly, even though it is required by the 89e9feffd0Smrg GNU Coding Standards. 90e9feffd0Smrg 91e9feffd0Smrg 8. Some packages, particularly those that use Automake, provide `make 92e9feffd0Smrg distcheck', which can by used by developers to test that all other 93e9feffd0Smrg targets like `make install' and `make uninstall' work correctly. 94e9feffd0Smrg This target is generally not run by end users. 952d861bc5Smrg 9644d7874bSmrgCompilers and Options 9744d7874bSmrg===================== 9844d7874bSmrg 992d861bc5Smrg Some systems require unusual options for compilation or linking that 1002d861bc5Smrgthe `configure' script does not know about. Run `./configure --help' 1012d861bc5Smrgfor details on some of the pertinent environment variables. 10244d7874bSmrg 10344d7874bSmrg You can give `configure' initial values for configuration parameters 10444d7874bSmrgby setting variables in the command line or in the environment. Here 10544d7874bSmrgis an example: 10644d7874bSmrg 1072d861bc5Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 10844d7874bSmrg 10944d7874bSmrg *Note Defining Variables::, for more details. 11044d7874bSmrg 11144d7874bSmrgCompiling For Multiple Architectures 11244d7874bSmrg==================================== 11344d7874bSmrg 1142d861bc5Smrg You can compile the package for more than one kind of computer at the 11544d7874bSmrgsame time, by placing the object files for each architecture in their 1162d861bc5Smrgown directory. To do this, you can use GNU `make'. `cd' to the 11744d7874bSmrgdirectory where you want the object files and executables to go and run 11844d7874bSmrgthe `configure' script. `configure' automatically checks for the 119e9feffd0Smrgsource code in the directory that `configure' is in and in `..'. This 120e9feffd0Smrgis known as a "VPATH" build. 12144d7874bSmrg 1222d861bc5Smrg With a non-GNU `make', it is safer to compile the package for one 1232d861bc5Smrgarchitecture at a time in the source code directory. After you have 1242d861bc5Smrginstalled the package for one architecture, use `make distclean' before 1252d861bc5Smrgreconfiguring for another architecture. 1262d861bc5Smrg 1272d861bc5Smrg On MacOS X 10.5 and later systems, you can create libraries and 1282d861bc5Smrgexecutables that work on multiple system types--known as "fat" or 1292d861bc5Smrg"universal" binaries--by specifying multiple `-arch' options to the 1302d861bc5Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1312d861bc5Smrgthis: 1322d861bc5Smrg 1332d861bc5Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1342d861bc5Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1352d861bc5Smrg CPP="gcc -E" CXXCPP="g++ -E" 1362d861bc5Smrg 1372d861bc5Smrg This is not guaranteed to produce working output in all cases, you 1382d861bc5Smrgmay have to build one architecture at a time and combine the results 1392d861bc5Smrgusing the `lipo' tool if you have problems. 14044d7874bSmrg 14144d7874bSmrgInstallation Names 14244d7874bSmrg================== 14344d7874bSmrg 1442d861bc5Smrg By default, `make install' installs the package's commands under 14544d7874bSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14644d7874bSmrgcan specify an installation prefix other than `/usr/local' by giving 147e9feffd0Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148e9feffd0Smrgabsolute file name. 14944d7874bSmrg 15044d7874bSmrg You can specify separate installation prefixes for 15144d7874bSmrgarchitecture-specific files and architecture-independent files. If you 15244d7874bSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15344d7874bSmrgPREFIX as the prefix for installing programs and libraries. 15444d7874bSmrgDocumentation and other data files still use the regular prefix. 15544d7874bSmrg 15644d7874bSmrg In addition, if you use an unusual directory layout you can give 15744d7874bSmrgoptions like `--bindir=DIR' to specify different values for particular 15844d7874bSmrgkinds of files. Run `configure --help' for a list of the directories 159e9feffd0Smrgyou can set and what kinds of files go in them. In general, the 160e9feffd0Smrgdefault for these options is expressed in terms of `${prefix}', so that 161e9feffd0Smrgspecifying just `--prefix' will affect all of the other directory 162e9feffd0Smrgspecifications that were not explicitly provided. 163e9feffd0Smrg 164e9feffd0Smrg The most portable way to affect installation locations is to pass the 165e9feffd0Smrgcorrect locations to `configure'; however, many packages provide one or 166e9feffd0Smrgboth of the following shortcuts of passing variable assignments to the 167e9feffd0Smrg`make install' command line to change installation locations without 168e9feffd0Smrghaving to reconfigure or recompile. 169e9feffd0Smrg 170e9feffd0Smrg The first method involves providing an override variable for each 171e9feffd0Smrgaffected directory. For example, `make install 172e9feffd0Smrgprefix=/alternate/directory' will choose an alternate location for all 173e9feffd0Smrgdirectory configuration variables that were expressed in terms of 174e9feffd0Smrg`${prefix}'. Any directories that were specified during `configure', 175e9feffd0Smrgbut not in terms of `${prefix}', must each be overridden at install 176e9feffd0Smrgtime for the entire installation to be relocated. The approach of 177e9feffd0Smrgmakefile variable overrides for each directory variable is required by 178e9feffd0Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179e9feffd0SmrgHowever, some platforms have known limitations with the semantics of 180e9feffd0Smrgshared libraries that end up requiring recompilation when using this 181e9feffd0Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182e9feffd0Smrg 183e9feffd0Smrg The second method involves providing the `DESTDIR' variable. For 184e9feffd0Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185e9feffd0Smrg`/alternate/directory' before all installation names. The approach of 186e9feffd0Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187e9feffd0Smrgdoes not work on platforms that have drive letters. On the other hand, 188e9feffd0Smrgit does better at avoiding recompilation issues, and works well even 189e9feffd0Smrgwhen some directory options were not specified in terms of `${prefix}' 190e9feffd0Smrgat `configure' time. 191e9feffd0Smrg 192e9feffd0SmrgOptional Features 193e9feffd0Smrg================= 19444d7874bSmrg 19544d7874bSmrg If the package supports it, you can cause programs to be installed 19644d7874bSmrgwith an extra prefix or suffix on their names by giving `configure' the 19744d7874bSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 19844d7874bSmrg 1992d861bc5Smrg Some packages pay attention to `--enable-FEATURE' options to 20044d7874bSmrg`configure', where FEATURE indicates an optional part of the package. 20144d7874bSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 20244d7874bSmrgis something like `gnu-as' or `x' (for the X Window System). The 20344d7874bSmrg`README' should mention any `--enable-' and `--with-' options that the 20444d7874bSmrgpackage recognizes. 20544d7874bSmrg 20644d7874bSmrg For packages that use the X Window System, `configure' can usually 20744d7874bSmrgfind the X include and library files automatically, but if it doesn't, 20844d7874bSmrgyou can use the `configure' options `--x-includes=DIR' and 20944d7874bSmrg`--x-libraries=DIR' to specify their locations. 21044d7874bSmrg 211e9feffd0Smrg Some packages offer the ability to configure how verbose the 212e9feffd0Smrgexecution of `make' will be. For these packages, running `./configure 213e9feffd0Smrg--enable-silent-rules' sets the default to minimal output, which can be 214e9feffd0Smrgoverridden with `make V=1'; while running `./configure 215e9feffd0Smrg--disable-silent-rules' sets the default to verbose, which can be 216e9feffd0Smrgoverridden with `make V=0'. 217e9feffd0Smrg 2182d861bc5SmrgParticular systems 2192d861bc5Smrg================== 2202d861bc5Smrg 2212d861bc5Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2222d861bc5SmrgCC is not installed, it is recommended to use the following options in 2232d861bc5Smrgorder to use an ANSI C compiler: 2242d861bc5Smrg 225e9feffd0Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2262d861bc5Smrg 2272d861bc5Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2282d861bc5Smrg 229e9feffd0Smrg HP-UX `make' updates targets which have the same time stamps as 230e9feffd0Smrgtheir prerequisites, which makes it generally unusable when shipped 231e9feffd0Smrggenerated files such as `configure' are involved. Use GNU `make' 232e9feffd0Smrginstead. 233e9feffd0Smrg 2342d861bc5Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2352d861bc5Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2362d861bc5Smrga workaround. If GNU CC is not installed, it is therefore recommended 2372d861bc5Smrgto try 2382d861bc5Smrg 2392d861bc5Smrg ./configure CC="cc" 2402d861bc5Smrg 2412d861bc5Smrgand if that doesn't work, try 2422d861bc5Smrg 2432d861bc5Smrg ./configure CC="cc -nodtk" 2442d861bc5Smrg 245e9feffd0Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246e9feffd0Smrgdirectory contains several dysfunctional programs; working variants of 247e9feffd0Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248e9feffd0Smrgin your `PATH', put it _after_ `/usr/bin'. 249e9feffd0Smrg 250e9feffd0Smrg On Haiku, software installed for all users goes in `/boot/common', 251e9feffd0Smrgnot `/usr/local'. It is recommended to use the following options: 252e9feffd0Smrg 253e9feffd0Smrg ./configure --prefix=/boot/common 254e9feffd0Smrg 25544d7874bSmrgSpecifying the System Type 25644d7874bSmrg========================== 25744d7874bSmrg 2582d861bc5Smrg There may be some features `configure' cannot figure out 2592d861bc5Smrgautomatically, but needs to determine by the type of machine the package 2602d861bc5Smrgwill run on. Usually, assuming the package is built to be run on the 2612d861bc5Smrg_same_ architectures, `configure' can figure that out, but if it prints 2622d861bc5Smrga message saying it cannot guess the machine type, give it the 26344d7874bSmrg`--build=TYPE' option. TYPE can either be a short name for the system 26444d7874bSmrgtype, such as `sun4', or a canonical name which has the form: 26544d7874bSmrg 26644d7874bSmrg CPU-COMPANY-SYSTEM 26744d7874bSmrg 26844d7874bSmrgwhere SYSTEM can have one of these forms: 26944d7874bSmrg 270e9feffd0Smrg OS 271e9feffd0Smrg KERNEL-OS 27244d7874bSmrg 27344d7874bSmrg See the file `config.sub' for the possible values of each field. If 27444d7874bSmrg`config.sub' isn't included in this package, then this package doesn't 27544d7874bSmrgneed to know the machine type. 27644d7874bSmrg 27744d7874bSmrg If you are _building_ compiler tools for cross-compiling, you should 27844d7874bSmrguse the option `--target=TYPE' to select the type of system they will 27944d7874bSmrgproduce code for. 28044d7874bSmrg 28144d7874bSmrg If you want to _use_ a cross compiler, that generates code for a 28244d7874bSmrgplatform different from the build platform, you should specify the 28344d7874bSmrg"host" platform (i.e., that on which the generated programs will 28444d7874bSmrgeventually be run) with `--host=TYPE'. 28544d7874bSmrg 28644d7874bSmrgSharing Defaults 28744d7874bSmrg================ 28844d7874bSmrg 2892d861bc5Smrg If you want to set default values for `configure' scripts to share, 2902d861bc5Smrgyou can create a site shell script called `config.site' that gives 2912d861bc5Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 29244d7874bSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 29344d7874bSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 29444d7874bSmrg`CONFIG_SITE' environment variable to the location of the site script. 29544d7874bSmrgA warning: not all `configure' scripts look for a site script. 29644d7874bSmrg 29744d7874bSmrgDefining Variables 29844d7874bSmrg================== 29944d7874bSmrg 3002d861bc5Smrg Variables not defined in a site shell script can be set in the 30144d7874bSmrgenvironment passed to `configure'. However, some packages may run 30244d7874bSmrgconfigure again during the build, and the customized values of these 30344d7874bSmrgvariables may be lost. In order to avoid this problem, you should set 30444d7874bSmrgthem in the `configure' command line, using `VAR=value'. For example: 30544d7874bSmrg 30644d7874bSmrg ./configure CC=/usr/local2/bin/gcc 30744d7874bSmrg 30844d7874bSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 3092d861bc5Smrgoverridden in the site shell script). 31044d7874bSmrg 3112d861bc5SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3122d861bc5Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 31344d7874bSmrg 3142d861bc5Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 31544d7874bSmrg 31644d7874bSmrg`configure' Invocation 31744d7874bSmrg====================== 31844d7874bSmrg 3192d861bc5Smrg `configure' recognizes the following options to control how it 3202d861bc5Smrgoperates. 32144d7874bSmrg 32244d7874bSmrg`--help' 32344d7874bSmrg`-h' 3242d861bc5Smrg Print a summary of all of the options to `configure', and exit. 3252d861bc5Smrg 3262d861bc5Smrg`--help=short' 3272d861bc5Smrg`--help=recursive' 3282d861bc5Smrg Print a summary of the options unique to this package's 3292d861bc5Smrg `configure', and exit. The `short' variant lists options used 3302d861bc5Smrg only in the top level, while the `recursive' variant lists options 3312d861bc5Smrg also present in any nested packages. 33244d7874bSmrg 33344d7874bSmrg`--version' 33444d7874bSmrg`-V' 33544d7874bSmrg Print the version of Autoconf used to generate the `configure' 33644d7874bSmrg script, and exit. 33744d7874bSmrg 33844d7874bSmrg`--cache-file=FILE' 33944d7874bSmrg Enable the cache: use and save the results of the tests in FILE, 34044d7874bSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 34144d7874bSmrg disable caching. 34244d7874bSmrg 34344d7874bSmrg`--config-cache' 34444d7874bSmrg`-C' 34544d7874bSmrg Alias for `--cache-file=config.cache'. 34644d7874bSmrg 34744d7874bSmrg`--quiet' 34844d7874bSmrg`--silent' 34944d7874bSmrg`-q' 35044d7874bSmrg Do not print messages saying which checks are being made. To 35144d7874bSmrg suppress all normal output, redirect it to `/dev/null' (any error 35244d7874bSmrg messages will still be shown). 35344d7874bSmrg 35444d7874bSmrg`--srcdir=DIR' 35544d7874bSmrg Look for the package's source code in directory DIR. Usually 35644d7874bSmrg `configure' can determine that directory automatically. 35744d7874bSmrg 3582d861bc5Smrg`--prefix=DIR' 359e9feffd0Smrg Use DIR as the installation prefix. *note Installation Names:: 3602d861bc5Smrg for more details, including other options available for fine-tuning 3612d861bc5Smrg the installation locations. 3622d861bc5Smrg 3632d861bc5Smrg`--no-create' 3642d861bc5Smrg`-n' 3652d861bc5Smrg Run the configure checks, but stop before creating any output 3662d861bc5Smrg files. 3672d861bc5Smrg 36844d7874bSmrg`configure' also accepts some other, not widely useful, options. Run 36944d7874bSmrg`configure --help' for more details. 37044d7874bSmrg 371