155acc8fcSmrgInstallation Instructions 255acc8fcSmrg************************* 355acc8fcSmrg 4e1c0d025SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5e1c0d025SmrgInc. 655acc8fcSmrg 7e1c0d025Smrg Copying and distribution of this file, with or without modification, 8e1c0d025Smrgare permitted in any medium without royalty provided the copyright 9e1c0d025Smrgnotice and this notice are preserved. This file is offered as-is, 10e1c0d025Smrgwithout warranty of any kind. 1155acc8fcSmrg 1255acc8fcSmrgBasic Installation 1355acc8fcSmrg================== 1455acc8fcSmrg 1555acc8fcSmrg Briefly, the shell commands `./configure; make; make install' should 1655acc8fcSmrgconfigure, build, and install this package. The following 1755acc8fcSmrgmore-detailed instructions are generic; see the `README' file for 18e1c0d025Smrginstructions specific to this package. Some packages provide this 19e1c0d025Smrg`INSTALL' file but do not implement all of the features documented 20e1c0d025Smrgbelow. The lack of an optional feature in a given package is not 21e1c0d025Smrgnecessarily a bug. More recommendations for GNU packages can be found 22e1c0d025Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 2355acc8fcSmrg 2455acc8fcSmrg The `configure' shell script attempts to guess correct values for 2555acc8fcSmrgvarious system-dependent variables used during compilation. It uses 2655acc8fcSmrgthose values to create a `Makefile' in each directory of the package. 2755acc8fcSmrgIt may also create one or more `.h' files containing system-dependent 2855acc8fcSmrgdefinitions. Finally, it creates a shell script `config.status' that 2955acc8fcSmrgyou can run in the future to recreate the current configuration, and a 3055acc8fcSmrgfile `config.log' containing compiler output (useful mainly for 3155acc8fcSmrgdebugging `configure'). 3255acc8fcSmrg 3355acc8fcSmrg It can also use an optional file (typically called `config.cache' 3455acc8fcSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 3555acc8fcSmrgthe results of its tests to speed up reconfiguring. Caching is 3655acc8fcSmrgdisabled by default to prevent problems with accidental use of stale 3755acc8fcSmrgcache files. 3855acc8fcSmrg 3955acc8fcSmrg If you need to do unusual things to compile the package, please try 4055acc8fcSmrgto figure out how `configure' could check whether to do them, and mail 4155acc8fcSmrgdiffs or instructions to the address given in the `README' so they can 4255acc8fcSmrgbe considered for the next release. If you are using the cache, and at 4355acc8fcSmrgsome point `config.cache' contains results you don't want to keep, you 4455acc8fcSmrgmay remove or edit it. 4555acc8fcSmrg 4655acc8fcSmrg The file `configure.ac' (or `configure.in') is used to create 4755acc8fcSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 4855acc8fcSmrgyou want to change it or regenerate `configure' using a newer version 4955acc8fcSmrgof `autoconf'. 5055acc8fcSmrg 51e1c0d025Smrg The simplest way to compile this package is: 5255acc8fcSmrg 5355acc8fcSmrg 1. `cd' to the directory containing the package's source code and type 5455acc8fcSmrg `./configure' to configure the package for your system. 5555acc8fcSmrg 5655acc8fcSmrg Running `configure' might take a while. While running, it prints 5755acc8fcSmrg some messages telling which features it is checking for. 5855acc8fcSmrg 5955acc8fcSmrg 2. Type `make' to compile the package. 6055acc8fcSmrg 6155acc8fcSmrg 3. Optionally, type `make check' to run any self-tests that come with 62e1c0d025Smrg the package, generally using the just-built uninstalled binaries. 6355acc8fcSmrg 6455acc8fcSmrg 4. Type `make install' to install the programs and any data files and 65e1c0d025Smrg documentation. When installing into a prefix owned by root, it is 66e1c0d025Smrg recommended that the package be configured and built as a regular 67e1c0d025Smrg user, and only the `make install' phase executed with root 68e1c0d025Smrg privileges. 69e1c0d025Smrg 70e1c0d025Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71e1c0d025Smrg this time using the binaries in their final installed location. 72e1c0d025Smrg This target does not install anything. Running this target as a 73e1c0d025Smrg regular user, particularly if the prior `make install' required 74e1c0d025Smrg root privileges, verifies that the installation completed 75e1c0d025Smrg correctly. 76e1c0d025Smrg 77e1c0d025Smrg 6. You can remove the program binaries and object files from the 7855acc8fcSmrg source code directory by typing `make clean'. To also remove the 7955acc8fcSmrg files that `configure' created (so you can compile the package for 8055acc8fcSmrg a different kind of computer), type `make distclean'. There is 8155acc8fcSmrg also a `make maintainer-clean' target, but that is intended mainly 8255acc8fcSmrg for the package's developers. If you use it, you may have to get 8355acc8fcSmrg all sorts of other programs in order to regenerate files that came 8455acc8fcSmrg with the distribution. 8555acc8fcSmrg 86e1c0d025Smrg 7. Often, you can also type `make uninstall' to remove the installed 87e1c0d025Smrg files again. In practice, not all packages have tested that 88e1c0d025Smrg uninstallation works correctly, even though it is required by the 89e1c0d025Smrg GNU Coding Standards. 90e1c0d025Smrg 91e1c0d025Smrg 8. Some packages, particularly those that use Automake, provide `make 92e1c0d025Smrg distcheck', which can by used by developers to test that all other 93e1c0d025Smrg targets like `make install' and `make uninstall' work correctly. 94e1c0d025Smrg This target is generally not run by end users. 9555acc8fcSmrg 9655acc8fcSmrgCompilers and Options 9755acc8fcSmrg===================== 9855acc8fcSmrg 9955acc8fcSmrg Some systems require unusual options for compilation or linking that 10055acc8fcSmrgthe `configure' script does not know about. Run `./configure --help' 10155acc8fcSmrgfor details on some of the pertinent environment variables. 10255acc8fcSmrg 10355acc8fcSmrg You can give `configure' initial values for configuration parameters 10455acc8fcSmrgby setting variables in the command line or in the environment. Here 10555acc8fcSmrgis an example: 10655acc8fcSmrg 10755acc8fcSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 10855acc8fcSmrg 10955acc8fcSmrg *Note Defining Variables::, for more details. 11055acc8fcSmrg 11155acc8fcSmrgCompiling For Multiple Architectures 11255acc8fcSmrg==================================== 11355acc8fcSmrg 11455acc8fcSmrg You can compile the package for more than one kind of computer at the 11555acc8fcSmrgsame time, by placing the object files for each architecture in their 11655acc8fcSmrgown directory. To do this, you can use GNU `make'. `cd' to the 11755acc8fcSmrgdirectory where you want the object files and executables to go and run 11855acc8fcSmrgthe `configure' script. `configure' automatically checks for the 119e1c0d025Smrgsource code in the directory that `configure' is in and in `..'. This 120e1c0d025Smrgis known as a "VPATH" build. 12155acc8fcSmrg 12255acc8fcSmrg With a non-GNU `make', it is safer to compile the package for one 12355acc8fcSmrgarchitecture at a time in the source code directory. After you have 12455acc8fcSmrginstalled the package for one architecture, use `make distclean' before 12555acc8fcSmrgreconfiguring for another architecture. 12655acc8fcSmrg 12755acc8fcSmrg On MacOS X 10.5 and later systems, you can create libraries and 12855acc8fcSmrgexecutables that work on multiple system types--known as "fat" or 12955acc8fcSmrg"universal" binaries--by specifying multiple `-arch' options to the 13055acc8fcSmrgcompiler but only a single `-arch' option to the preprocessor. Like 13155acc8fcSmrgthis: 13255acc8fcSmrg 13355acc8fcSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13455acc8fcSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13555acc8fcSmrg CPP="gcc -E" CXXCPP="g++ -E" 13655acc8fcSmrg 13755acc8fcSmrg This is not guaranteed to produce working output in all cases, you 13855acc8fcSmrgmay have to build one architecture at a time and combine the results 13955acc8fcSmrgusing the `lipo' tool if you have problems. 14055acc8fcSmrg 14155acc8fcSmrgInstallation Names 14255acc8fcSmrg================== 14355acc8fcSmrg 14455acc8fcSmrg By default, `make install' installs the package's commands under 14555acc8fcSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14655acc8fcSmrgcan specify an installation prefix other than `/usr/local' by giving 147e1c0d025Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148e1c0d025Smrgabsolute file name. 14955acc8fcSmrg 15055acc8fcSmrg You can specify separate installation prefixes for 15155acc8fcSmrgarchitecture-specific files and architecture-independent files. If you 15255acc8fcSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15355acc8fcSmrgPREFIX as the prefix for installing programs and libraries. 15455acc8fcSmrgDocumentation and other data files still use the regular prefix. 15555acc8fcSmrg 15655acc8fcSmrg In addition, if you use an unusual directory layout you can give 15755acc8fcSmrgoptions like `--bindir=DIR' to specify different values for particular 15855acc8fcSmrgkinds of files. Run `configure --help' for a list of the directories 159e1c0d025Smrgyou can set and what kinds of files go in them. In general, the 160e1c0d025Smrgdefault for these options is expressed in terms of `${prefix}', so that 161e1c0d025Smrgspecifying just `--prefix' will affect all of the other directory 162e1c0d025Smrgspecifications that were not explicitly provided. 163e1c0d025Smrg 164e1c0d025Smrg The most portable way to affect installation locations is to pass the 165e1c0d025Smrgcorrect locations to `configure'; however, many packages provide one or 166e1c0d025Smrgboth of the following shortcuts of passing variable assignments to the 167e1c0d025Smrg`make install' command line to change installation locations without 168e1c0d025Smrghaving to reconfigure or recompile. 169e1c0d025Smrg 170e1c0d025Smrg The first method involves providing an override variable for each 171e1c0d025Smrgaffected directory. For example, `make install 172e1c0d025Smrgprefix=/alternate/directory' will choose an alternate location for all 173e1c0d025Smrgdirectory configuration variables that were expressed in terms of 174e1c0d025Smrg`${prefix}'. Any directories that were specified during `configure', 175e1c0d025Smrgbut not in terms of `${prefix}', must each be overridden at install 176e1c0d025Smrgtime for the entire installation to be relocated. The approach of 177e1c0d025Smrgmakefile variable overrides for each directory variable is required by 178e1c0d025Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179e1c0d025SmrgHowever, some platforms have known limitations with the semantics of 180e1c0d025Smrgshared libraries that end up requiring recompilation when using this 181e1c0d025Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182e1c0d025Smrg 183e1c0d025Smrg The second method involves providing the `DESTDIR' variable. For 184e1c0d025Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185e1c0d025Smrg`/alternate/directory' before all installation names. The approach of 186e1c0d025Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187e1c0d025Smrgdoes not work on platforms that have drive letters. On the other hand, 188e1c0d025Smrgit does better at avoiding recompilation issues, and works well even 189e1c0d025Smrgwhen some directory options were not specified in terms of `${prefix}' 190e1c0d025Smrgat `configure' time. 191e1c0d025Smrg 192e1c0d025SmrgOptional Features 193e1c0d025Smrg================= 19455acc8fcSmrg 19555acc8fcSmrg If the package supports it, you can cause programs to be installed 19655acc8fcSmrgwith an extra prefix or suffix on their names by giving `configure' the 19755acc8fcSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 19855acc8fcSmrg 19955acc8fcSmrg Some packages pay attention to `--enable-FEATURE' options to 20055acc8fcSmrg`configure', where FEATURE indicates an optional part of the package. 20155acc8fcSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 20255acc8fcSmrgis something like `gnu-as' or `x' (for the X Window System). The 20355acc8fcSmrg`README' should mention any `--enable-' and `--with-' options that the 20455acc8fcSmrgpackage recognizes. 20555acc8fcSmrg 20655acc8fcSmrg For packages that use the X Window System, `configure' can usually 20755acc8fcSmrgfind the X include and library files automatically, but if it doesn't, 20855acc8fcSmrgyou can use the `configure' options `--x-includes=DIR' and 20955acc8fcSmrg`--x-libraries=DIR' to specify their locations. 21055acc8fcSmrg 211e1c0d025Smrg Some packages offer the ability to configure how verbose the 212e1c0d025Smrgexecution of `make' will be. For these packages, running `./configure 213e1c0d025Smrg--enable-silent-rules' sets the default to minimal output, which can be 214e1c0d025Smrgoverridden with `make V=1'; while running `./configure 215e1c0d025Smrg--disable-silent-rules' sets the default to verbose, which can be 216e1c0d025Smrgoverridden with `make V=0'. 217e1c0d025Smrg 21855acc8fcSmrgParticular systems 21955acc8fcSmrg================== 22055acc8fcSmrg 22155acc8fcSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 22255acc8fcSmrgCC is not installed, it is recommended to use the following options in 22355acc8fcSmrgorder to use an ANSI C compiler: 22455acc8fcSmrg 225e1c0d025Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 22655acc8fcSmrg 22755acc8fcSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 22855acc8fcSmrg 229e1c0d025Smrg HP-UX `make' updates targets which have the same time stamps as 230e1c0d025Smrgtheir prerequisites, which makes it generally unusable when shipped 231e1c0d025Smrggenerated files such as `configure' are involved. Use GNU `make' 232e1c0d025Smrginstead. 233e1c0d025Smrg 23455acc8fcSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 23555acc8fcSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 23655acc8fcSmrga workaround. If GNU CC is not installed, it is therefore recommended 23755acc8fcSmrgto try 23855acc8fcSmrg 23955acc8fcSmrg ./configure CC="cc" 24055acc8fcSmrg 24155acc8fcSmrgand if that doesn't work, try 24255acc8fcSmrg 24355acc8fcSmrg ./configure CC="cc -nodtk" 24455acc8fcSmrg 245e1c0d025Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246e1c0d025Smrgdirectory contains several dysfunctional programs; working variants of 247e1c0d025Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248e1c0d025Smrgin your `PATH', put it _after_ `/usr/bin'. 249e1c0d025Smrg 250e1c0d025Smrg On Haiku, software installed for all users goes in `/boot/common', 251e1c0d025Smrgnot `/usr/local'. It is recommended to use the following options: 252e1c0d025Smrg 253e1c0d025Smrg ./configure --prefix=/boot/common 254e1c0d025Smrg 25555acc8fcSmrgSpecifying the System Type 25655acc8fcSmrg========================== 25755acc8fcSmrg 25855acc8fcSmrg There may be some features `configure' cannot figure out 25955acc8fcSmrgautomatically, but needs to determine by the type of machine the package 26055acc8fcSmrgwill run on. Usually, assuming the package is built to be run on the 26155acc8fcSmrg_same_ architectures, `configure' can figure that out, but if it prints 26255acc8fcSmrga message saying it cannot guess the machine type, give it the 26355acc8fcSmrg`--build=TYPE' option. TYPE can either be a short name for the system 26455acc8fcSmrgtype, such as `sun4', or a canonical name which has the form: 26555acc8fcSmrg 26655acc8fcSmrg CPU-COMPANY-SYSTEM 26755acc8fcSmrg 26855acc8fcSmrgwhere SYSTEM can have one of these forms: 26955acc8fcSmrg 270e1c0d025Smrg OS 271e1c0d025Smrg KERNEL-OS 27255acc8fcSmrg 27355acc8fcSmrg See the file `config.sub' for the possible values of each field. If 27455acc8fcSmrg`config.sub' isn't included in this package, then this package doesn't 27555acc8fcSmrgneed to know the machine type. 27655acc8fcSmrg 27755acc8fcSmrg If you are _building_ compiler tools for cross-compiling, you should 27855acc8fcSmrguse the option `--target=TYPE' to select the type of system they will 27955acc8fcSmrgproduce code for. 28055acc8fcSmrg 28155acc8fcSmrg If you want to _use_ a cross compiler, that generates code for a 28255acc8fcSmrgplatform different from the build platform, you should specify the 28355acc8fcSmrg"host" platform (i.e., that on which the generated programs will 28455acc8fcSmrgeventually be run) with `--host=TYPE'. 28555acc8fcSmrg 28655acc8fcSmrgSharing Defaults 28755acc8fcSmrg================ 28855acc8fcSmrg 28955acc8fcSmrg If you want to set default values for `configure' scripts to share, 29055acc8fcSmrgyou can create a site shell script called `config.site' that gives 29155acc8fcSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 29255acc8fcSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 29355acc8fcSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 29455acc8fcSmrg`CONFIG_SITE' environment variable to the location of the site script. 29555acc8fcSmrgA warning: not all `configure' scripts look for a site script. 29655acc8fcSmrg 29755acc8fcSmrgDefining Variables 29855acc8fcSmrg================== 29955acc8fcSmrg 30055acc8fcSmrg Variables not defined in a site shell script can be set in the 30155acc8fcSmrgenvironment passed to `configure'. However, some packages may run 30255acc8fcSmrgconfigure again during the build, and the customized values of these 30355acc8fcSmrgvariables may be lost. In order to avoid this problem, you should set 30455acc8fcSmrgthem in the `configure' command line, using `VAR=value'. For example: 30555acc8fcSmrg 30655acc8fcSmrg ./configure CC=/usr/local2/bin/gcc 30755acc8fcSmrg 30855acc8fcSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 30955acc8fcSmrgoverridden in the site shell script). 31055acc8fcSmrg 31155acc8fcSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 31255acc8fcSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 31355acc8fcSmrg 31455acc8fcSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 31555acc8fcSmrg 31655acc8fcSmrg`configure' Invocation 31755acc8fcSmrg====================== 31855acc8fcSmrg 31955acc8fcSmrg `configure' recognizes the following options to control how it 32055acc8fcSmrgoperates. 32155acc8fcSmrg 32255acc8fcSmrg`--help' 32355acc8fcSmrg`-h' 32455acc8fcSmrg Print a summary of all of the options to `configure', and exit. 32555acc8fcSmrg 32655acc8fcSmrg`--help=short' 32755acc8fcSmrg`--help=recursive' 32855acc8fcSmrg Print a summary of the options unique to this package's 32955acc8fcSmrg `configure', and exit. The `short' variant lists options used 33055acc8fcSmrg only in the top level, while the `recursive' variant lists options 33155acc8fcSmrg also present in any nested packages. 33255acc8fcSmrg 33355acc8fcSmrg`--version' 33455acc8fcSmrg`-V' 33555acc8fcSmrg Print the version of Autoconf used to generate the `configure' 33655acc8fcSmrg script, and exit. 33755acc8fcSmrg 33855acc8fcSmrg`--cache-file=FILE' 33955acc8fcSmrg Enable the cache: use and save the results of the tests in FILE, 34055acc8fcSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 34155acc8fcSmrg disable caching. 34255acc8fcSmrg 34355acc8fcSmrg`--config-cache' 34455acc8fcSmrg`-C' 34555acc8fcSmrg Alias for `--cache-file=config.cache'. 34655acc8fcSmrg 34755acc8fcSmrg`--quiet' 34855acc8fcSmrg`--silent' 34955acc8fcSmrg`-q' 35055acc8fcSmrg Do not print messages saying which checks are being made. To 35155acc8fcSmrg suppress all normal output, redirect it to `/dev/null' (any error 35255acc8fcSmrg messages will still be shown). 35355acc8fcSmrg 35455acc8fcSmrg`--srcdir=DIR' 35555acc8fcSmrg Look for the package's source code in directory DIR. Usually 35655acc8fcSmrg `configure' can determine that directory automatically. 35755acc8fcSmrg 35855acc8fcSmrg`--prefix=DIR' 359e1c0d025Smrg Use DIR as the installation prefix. *note Installation Names:: 36055acc8fcSmrg for more details, including other options available for fine-tuning 36155acc8fcSmrg the installation locations. 36255acc8fcSmrg 36355acc8fcSmrg`--no-create' 36455acc8fcSmrg`-n' 36555acc8fcSmrg Run the configure checks, but stop before creating any output 36655acc8fcSmrg files. 36755acc8fcSmrg 36855acc8fcSmrg`configure' also accepts some other, not widely useful, options. Run 36955acc8fcSmrg`configure --help' for more details. 37055acc8fcSmrg 371