10fa2845dSmrgInstallation Instructions 20fa2845dSmrg************************* 30fa2845dSmrg 4f66be5ecSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5f66be5ecSmrgInc. 60fa2845dSmrg 7f66be5ecSmrg Copying and distribution of this file, with or without modification, 8f66be5ecSmrgare permitted in any medium without royalty provided the copyright 9f66be5ecSmrgnotice and this notice are preserved. This file is offered as-is, 10f66be5ecSmrgwithout warranty of any kind. 110fa2845dSmrg 120fa2845dSmrgBasic Installation 130fa2845dSmrg================== 140fa2845dSmrg 15ec74af46Smrg Briefly, the shell commands `./configure; make; make install' should 16ec74af46Smrgconfigure, build, and install this package. The following 17ec74af46Smrgmore-detailed instructions are generic; see the `README' file for 18f66be5ecSmrginstructions specific to this package. Some packages provide this 19f66be5ecSmrg`INSTALL' file but do not implement all of the features documented 20f66be5ecSmrgbelow. The lack of an optional feature in a given package is not 21f66be5ecSmrgnecessarily a bug. More recommendations for GNU packages can be found 22f66be5ecSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 230fa2845dSmrg 240fa2845dSmrg The `configure' shell script attempts to guess correct values for 250fa2845dSmrgvarious system-dependent variables used during compilation. It uses 260fa2845dSmrgthose values to create a `Makefile' in each directory of the package. 270fa2845dSmrgIt may also create one or more `.h' files containing system-dependent 280fa2845dSmrgdefinitions. Finally, it creates a shell script `config.status' that 290fa2845dSmrgyou can run in the future to recreate the current configuration, and a 300fa2845dSmrgfile `config.log' containing compiler output (useful mainly for 310fa2845dSmrgdebugging `configure'). 320fa2845dSmrg 330fa2845dSmrg It can also use an optional file (typically called `config.cache' 340fa2845dSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35ec74af46Smrgthe results of its tests to speed up reconfiguring. Caching is 360fa2845dSmrgdisabled by default to prevent problems with accidental use of stale 37ec74af46Smrgcache files. 380fa2845dSmrg 390fa2845dSmrg If you need to do unusual things to compile the package, please try 400fa2845dSmrgto figure out how `configure' could check whether to do them, and mail 410fa2845dSmrgdiffs or instructions to the address given in the `README' so they can 420fa2845dSmrgbe considered for the next release. If you are using the cache, and at 430fa2845dSmrgsome point `config.cache' contains results you don't want to keep, you 440fa2845dSmrgmay remove or edit it. 450fa2845dSmrg 460fa2845dSmrg The file `configure.ac' (or `configure.in') is used to create 47ec74af46Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48ec74af46Smrgyou want to change it or regenerate `configure' using a newer version 49ec74af46Smrgof `autoconf'. 500fa2845dSmrg 51f66be5ecSmrg The simplest way to compile this package is: 520fa2845dSmrg 530fa2845dSmrg 1. `cd' to the directory containing the package's source code and type 54ec74af46Smrg `./configure' to configure the package for your system. 550fa2845dSmrg 56ec74af46Smrg Running `configure' might take a while. While running, it prints 57ec74af46Smrg some messages telling which features it is checking for. 580fa2845dSmrg 590fa2845dSmrg 2. Type `make' to compile the package. 600fa2845dSmrg 610fa2845dSmrg 3. Optionally, type `make check' to run any self-tests that come with 62f66be5ecSmrg the package, generally using the just-built uninstalled binaries. 630fa2845dSmrg 640fa2845dSmrg 4. Type `make install' to install the programs and any data files and 65f66be5ecSmrg documentation. When installing into a prefix owned by root, it is 66f66be5ecSmrg recommended that the package be configured and built as a regular 67f66be5ecSmrg user, and only the `make install' phase executed with root 68f66be5ecSmrg privileges. 69f66be5ecSmrg 70f66be5ecSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71f66be5ecSmrg this time using the binaries in their final installed location. 72f66be5ecSmrg This target does not install anything. Running this target as a 73f66be5ecSmrg regular user, particularly if the prior `make install' required 74f66be5ecSmrg root privileges, verifies that the installation completed 75f66be5ecSmrg correctly. 76f66be5ecSmrg 77f66be5ecSmrg 6. You can remove the program binaries and object files from the 780fa2845dSmrg source code directory by typing `make clean'. To also remove the 790fa2845dSmrg files that `configure' created (so you can compile the package for 800fa2845dSmrg a different kind of computer), type `make distclean'. There is 810fa2845dSmrg also a `make maintainer-clean' target, but that is intended mainly 820fa2845dSmrg for the package's developers. If you use it, you may have to get 830fa2845dSmrg all sorts of other programs in order to regenerate files that came 840fa2845dSmrg with the distribution. 850fa2845dSmrg 86f66be5ecSmrg 7. Often, you can also type `make uninstall' to remove the installed 87f66be5ecSmrg files again. In practice, not all packages have tested that 88f66be5ecSmrg uninstallation works correctly, even though it is required by the 89f66be5ecSmrg GNU Coding Standards. 90f66be5ecSmrg 91f66be5ecSmrg 8. Some packages, particularly those that use Automake, provide `make 92f66be5ecSmrg distcheck', which can by used by developers to test that all other 93f66be5ecSmrg targets like `make install' and `make uninstall' work correctly. 94f66be5ecSmrg This target is generally not run by end users. 95ec74af46Smrg 960fa2845dSmrgCompilers and Options 970fa2845dSmrg===================== 980fa2845dSmrg 99ec74af46Smrg Some systems require unusual options for compilation or linking that 100ec74af46Smrgthe `configure' script does not know about. Run `./configure --help' 101ec74af46Smrgfor details on some of the pertinent environment variables. 1020fa2845dSmrg 1030fa2845dSmrg You can give `configure' initial values for configuration parameters 1040fa2845dSmrgby setting variables in the command line or in the environment. Here 1050fa2845dSmrgis an example: 1060fa2845dSmrg 107ec74af46Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1080fa2845dSmrg 1090fa2845dSmrg *Note Defining Variables::, for more details. 1100fa2845dSmrg 1110fa2845dSmrgCompiling For Multiple Architectures 1120fa2845dSmrg==================================== 1130fa2845dSmrg 114ec74af46Smrg You can compile the package for more than one kind of computer at the 1150fa2845dSmrgsame time, by placing the object files for each architecture in their 116ec74af46Smrgown directory. To do this, you can use GNU `make'. `cd' to the 1170fa2845dSmrgdirectory where you want the object files and executables to go and run 1180fa2845dSmrgthe `configure' script. `configure' automatically checks for the 119f66be5ecSmrgsource code in the directory that `configure' is in and in `..'. This 120f66be5ecSmrgis known as a "VPATH" build. 1210fa2845dSmrg 122ec74af46Smrg With a non-GNU `make', it is safer to compile the package for one 123ec74af46Smrgarchitecture at a time in the source code directory. After you have 124ec74af46Smrginstalled the package for one architecture, use `make distclean' before 125ec74af46Smrgreconfiguring for another architecture. 126ec74af46Smrg 127ec74af46Smrg On MacOS X 10.5 and later systems, you can create libraries and 128ec74af46Smrgexecutables that work on multiple system types--known as "fat" or 129ec74af46Smrg"universal" binaries--by specifying multiple `-arch' options to the 130ec74af46Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131ec74af46Smrgthis: 132ec74af46Smrg 133ec74af46Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134ec74af46Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135ec74af46Smrg CPP="gcc -E" CXXCPP="g++ -E" 136ec74af46Smrg 137ec74af46Smrg This is not guaranteed to produce working output in all cases, you 138ec74af46Smrgmay have to build one architecture at a time and combine the results 139ec74af46Smrgusing the `lipo' tool if you have problems. 1400fa2845dSmrg 1410fa2845dSmrgInstallation Names 1420fa2845dSmrg================== 1430fa2845dSmrg 144ec74af46Smrg By default, `make install' installs the package's commands under 145ec74af46Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146ec74af46Smrgcan specify an installation prefix other than `/usr/local' by giving 147f66be5ecSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148f66be5ecSmrgabsolute file name. 1490fa2845dSmrg 1500fa2845dSmrg You can specify separate installation prefixes for 1510fa2845dSmrgarchitecture-specific files and architecture-independent files. If you 152ec74af46Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153ec74af46SmrgPREFIX as the prefix for installing programs and libraries. 154ec74af46SmrgDocumentation and other data files still use the regular prefix. 1550fa2845dSmrg 1560fa2845dSmrg In addition, if you use an unusual directory layout you can give 1570fa2845dSmrgoptions like `--bindir=DIR' to specify different values for particular 1580fa2845dSmrgkinds of files. Run `configure --help' for a list of the directories 159f66be5ecSmrgyou can set and what kinds of files go in them. In general, the 160f66be5ecSmrgdefault for these options is expressed in terms of `${prefix}', so that 161f66be5ecSmrgspecifying just `--prefix' will affect all of the other directory 162f66be5ecSmrgspecifications that were not explicitly provided. 163f66be5ecSmrg 164f66be5ecSmrg The most portable way to affect installation locations is to pass the 165f66be5ecSmrgcorrect locations to `configure'; however, many packages provide one or 166f66be5ecSmrgboth of the following shortcuts of passing variable assignments to the 167f66be5ecSmrg`make install' command line to change installation locations without 168f66be5ecSmrghaving to reconfigure or recompile. 169f66be5ecSmrg 170f66be5ecSmrg The first method involves providing an override variable for each 171f66be5ecSmrgaffected directory. For example, `make install 172f66be5ecSmrgprefix=/alternate/directory' will choose an alternate location for all 173f66be5ecSmrgdirectory configuration variables that were expressed in terms of 174f66be5ecSmrg`${prefix}'. Any directories that were specified during `configure', 175f66be5ecSmrgbut not in terms of `${prefix}', must each be overridden at install 176f66be5ecSmrgtime for the entire installation to be relocated. The approach of 177f66be5ecSmrgmakefile variable overrides for each directory variable is required by 178f66be5ecSmrgthe GNU Coding Standards, and ideally causes no recompilation. 179f66be5ecSmrgHowever, some platforms have known limitations with the semantics of 180f66be5ecSmrgshared libraries that end up requiring recompilation when using this 181f66be5ecSmrgmethod, particularly noticeable in packages that use GNU Libtool. 182f66be5ecSmrg 183f66be5ecSmrg The second method involves providing the `DESTDIR' variable. For 184f66be5ecSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 185f66be5ecSmrg`/alternate/directory' before all installation names. The approach of 186f66be5ecSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187f66be5ecSmrgdoes not work on platforms that have drive letters. On the other hand, 188f66be5ecSmrgit does better at avoiding recompilation issues, and works well even 189f66be5ecSmrgwhen some directory options were not specified in terms of `${prefix}' 190f66be5ecSmrgat `configure' time. 191f66be5ecSmrg 192f66be5ecSmrgOptional Features 193f66be5ecSmrg================= 1940fa2845dSmrg 1950fa2845dSmrg If the package supports it, you can cause programs to be installed 1960fa2845dSmrgwith an extra prefix or suffix on their names by giving `configure' the 1970fa2845dSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1980fa2845dSmrg 199ec74af46Smrg Some packages pay attention to `--enable-FEATURE' options to 2000fa2845dSmrg`configure', where FEATURE indicates an optional part of the package. 2010fa2845dSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2020fa2845dSmrgis something like `gnu-as' or `x' (for the X Window System). The 2030fa2845dSmrg`README' should mention any `--enable-' and `--with-' options that the 2040fa2845dSmrgpackage recognizes. 2050fa2845dSmrg 2060fa2845dSmrg For packages that use the X Window System, `configure' can usually 2070fa2845dSmrgfind the X include and library files automatically, but if it doesn't, 2080fa2845dSmrgyou can use the `configure' options `--x-includes=DIR' and 2090fa2845dSmrg`--x-libraries=DIR' to specify their locations. 2100fa2845dSmrg 211f66be5ecSmrg Some packages offer the ability to configure how verbose the 212f66be5ecSmrgexecution of `make' will be. For these packages, running `./configure 213f66be5ecSmrg--enable-silent-rules' sets the default to minimal output, which can be 214f66be5ecSmrgoverridden with `make V=1'; while running `./configure 215f66be5ecSmrg--disable-silent-rules' sets the default to verbose, which can be 216f66be5ecSmrgoverridden with `make V=0'. 217f66be5ecSmrg 218ec74af46SmrgParticular systems 219ec74af46Smrg================== 220ec74af46Smrg 221ec74af46Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222ec74af46SmrgCC is not installed, it is recommended to use the following options in 223ec74af46Smrgorder to use an ANSI C compiler: 224ec74af46Smrg 225f66be5ecSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226ec74af46Smrg 227ec74af46Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228ec74af46Smrg 229f66be5ecSmrg HP-UX `make' updates targets which have the same time stamps as 230f66be5ecSmrgtheir prerequisites, which makes it generally unusable when shipped 231f66be5ecSmrggenerated files such as `configure' are involved. Use GNU `make' 232f66be5ecSmrginstead. 233f66be5ecSmrg 234ec74af46Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235ec74af46Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236ec74af46Smrga workaround. If GNU CC is not installed, it is therefore recommended 237ec74af46Smrgto try 238ec74af46Smrg 239ec74af46Smrg ./configure CC="cc" 240ec74af46Smrg 241ec74af46Smrgand if that doesn't work, try 242ec74af46Smrg 243ec74af46Smrg ./configure CC="cc -nodtk" 244ec74af46Smrg 245f66be5ecSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246f66be5ecSmrgdirectory contains several dysfunctional programs; working variants of 247f66be5ecSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248f66be5ecSmrgin your `PATH', put it _after_ `/usr/bin'. 249f66be5ecSmrg 250f66be5ecSmrg On Haiku, software installed for all users goes in `/boot/common', 251f66be5ecSmrgnot `/usr/local'. It is recommended to use the following options: 252f66be5ecSmrg 253f66be5ecSmrg ./configure --prefix=/boot/common 254f66be5ecSmrg 2550fa2845dSmrgSpecifying the System Type 2560fa2845dSmrg========================== 2570fa2845dSmrg 258ec74af46Smrg There may be some features `configure' cannot figure out 259ec74af46Smrgautomatically, but needs to determine by the type of machine the package 260ec74af46Smrgwill run on. Usually, assuming the package is built to be run on the 261ec74af46Smrg_same_ architectures, `configure' can figure that out, but if it prints 262ec74af46Smrga message saying it cannot guess the machine type, give it the 2630fa2845dSmrg`--build=TYPE' option. TYPE can either be a short name for the system 2640fa2845dSmrgtype, such as `sun4', or a canonical name which has the form: 2650fa2845dSmrg 2660fa2845dSmrg CPU-COMPANY-SYSTEM 2670fa2845dSmrg 2680fa2845dSmrgwhere SYSTEM can have one of these forms: 2690fa2845dSmrg 270f66be5ecSmrg OS 271f66be5ecSmrg KERNEL-OS 2720fa2845dSmrg 2730fa2845dSmrg See the file `config.sub' for the possible values of each field. If 2740fa2845dSmrg`config.sub' isn't included in this package, then this package doesn't 2750fa2845dSmrgneed to know the machine type. 2760fa2845dSmrg 2770fa2845dSmrg If you are _building_ compiler tools for cross-compiling, you should 278ec74af46Smrguse the option `--target=TYPE' to select the type of system they will 2790fa2845dSmrgproduce code for. 2800fa2845dSmrg 2810fa2845dSmrg If you want to _use_ a cross compiler, that generates code for a 2820fa2845dSmrgplatform different from the build platform, you should specify the 2830fa2845dSmrg"host" platform (i.e., that on which the generated programs will 2840fa2845dSmrgeventually be run) with `--host=TYPE'. 2850fa2845dSmrg 2860fa2845dSmrgSharing Defaults 2870fa2845dSmrg================ 2880fa2845dSmrg 289ec74af46Smrg If you want to set default values for `configure' scripts to share, 290ec74af46Smrgyou can create a site shell script called `config.site' that gives 291ec74af46Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2920fa2845dSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2930fa2845dSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2940fa2845dSmrg`CONFIG_SITE' environment variable to the location of the site script. 2950fa2845dSmrgA warning: not all `configure' scripts look for a site script. 2960fa2845dSmrg 2970fa2845dSmrgDefining Variables 2980fa2845dSmrg================== 2990fa2845dSmrg 300ec74af46Smrg Variables not defined in a site shell script can be set in the 3010fa2845dSmrgenvironment passed to `configure'. However, some packages may run 3020fa2845dSmrgconfigure again during the build, and the customized values of these 3030fa2845dSmrgvariables may be lost. In order to avoid this problem, you should set 3040fa2845dSmrgthem in the `configure' command line, using `VAR=value'. For example: 3050fa2845dSmrg 3060fa2845dSmrg ./configure CC=/usr/local2/bin/gcc 3070fa2845dSmrg 3080fa2845dSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 309ec74af46Smrgoverridden in the site shell script). 3100fa2845dSmrg 311ec74af46SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312ec74af46Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3130fa2845dSmrg 314ec74af46Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3150fa2845dSmrg 3160fa2845dSmrg`configure' Invocation 3170fa2845dSmrg====================== 3180fa2845dSmrg 319ec74af46Smrg `configure' recognizes the following options to control how it 320ec74af46Smrgoperates. 3210fa2845dSmrg 3220fa2845dSmrg`--help' 3230fa2845dSmrg`-h' 324ec74af46Smrg Print a summary of all of the options to `configure', and exit. 325ec74af46Smrg 326ec74af46Smrg`--help=short' 327ec74af46Smrg`--help=recursive' 328ec74af46Smrg Print a summary of the options unique to this package's 329ec74af46Smrg `configure', and exit. The `short' variant lists options used 330ec74af46Smrg only in the top level, while the `recursive' variant lists options 331ec74af46Smrg also present in any nested packages. 3320fa2845dSmrg 3330fa2845dSmrg`--version' 3340fa2845dSmrg`-V' 3350fa2845dSmrg Print the version of Autoconf used to generate the `configure' 3360fa2845dSmrg script, and exit. 3370fa2845dSmrg 3380fa2845dSmrg`--cache-file=FILE' 3390fa2845dSmrg Enable the cache: use and save the results of the tests in FILE, 3400fa2845dSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3410fa2845dSmrg disable caching. 3420fa2845dSmrg 3430fa2845dSmrg`--config-cache' 3440fa2845dSmrg`-C' 3450fa2845dSmrg Alias for `--cache-file=config.cache'. 3460fa2845dSmrg 3470fa2845dSmrg`--quiet' 3480fa2845dSmrg`--silent' 3490fa2845dSmrg`-q' 3500fa2845dSmrg Do not print messages saying which checks are being made. To 3510fa2845dSmrg suppress all normal output, redirect it to `/dev/null' (any error 3520fa2845dSmrg messages will still be shown). 3530fa2845dSmrg 3540fa2845dSmrg`--srcdir=DIR' 3550fa2845dSmrg Look for the package's source code in directory DIR. Usually 3560fa2845dSmrg `configure' can determine that directory automatically. 3570fa2845dSmrg 358ec74af46Smrg`--prefix=DIR' 359f66be5ecSmrg Use DIR as the installation prefix. *note Installation Names:: 360ec74af46Smrg for more details, including other options available for fine-tuning 361ec74af46Smrg the installation locations. 362ec74af46Smrg 363ec74af46Smrg`--no-create' 364ec74af46Smrg`-n' 365ec74af46Smrg Run the configure checks, but stop before creating any output 366ec74af46Smrg files. 367ec74af46Smrg 3680fa2845dSmrg`configure' also accepts some other, not widely useful, options. Run 3690fa2845dSmrg`configure --help' for more details. 3700fa2845dSmrg 371