1e120bd27SmrgInstallation Instructions 2e120bd27Smrg************************* 3e120bd27Smrg 4198e4c3cSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5198e4c3cSmrgInc. 66c321187Smrg 7198e4c3cSmrg Copying and distribution of this file, with or without modification, 8198e4c3cSmrgare permitted in any medium without royalty provided the copyright 9198e4c3cSmrgnotice and this notice are preserved. This file is offered as-is, 10198e4c3cSmrgwithout warranty of any kind. 116c321187Smrg 126c321187SmrgBasic Installation 136c321187Smrg================== 146c321187Smrg 15e120bd27Smrg Briefly, the shell commands `./configure; make; make install' should 16e120bd27Smrgconfigure, build, and install this package. The following 17e120bd27Smrgmore-detailed instructions are generic; see the `README' file for 18198e4c3cSmrginstructions specific to this package. Some packages provide this 19198e4c3cSmrg`INSTALL' file but do not implement all of the features documented 20198e4c3cSmrgbelow. The lack of an optional feature in a given package is not 21198e4c3cSmrgnecessarily a bug. More recommendations for GNU packages can be found 22198e4c3cSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 236c321187Smrg 246c321187Smrg The `configure' shell script attempts to guess correct values for 256c321187Smrgvarious system-dependent variables used during compilation. It uses 266c321187Smrgthose values to create a `Makefile' in each directory of the package. 276c321187SmrgIt may also create one or more `.h' files containing system-dependent 286c321187Smrgdefinitions. Finally, it creates a shell script `config.status' that 296c321187Smrgyou can run in the future to recreate the current configuration, and a 306c321187Smrgfile `config.log' containing compiler output (useful mainly for 316c321187Smrgdebugging `configure'). 326c321187Smrg 336c321187Smrg It can also use an optional file (typically called `config.cache' 346c321187Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 35e120bd27Smrgthe results of its tests to speed up reconfiguring. Caching is 366c321187Smrgdisabled by default to prevent problems with accidental use of stale 37e120bd27Smrgcache files. 386c321187Smrg 396c321187Smrg If you need to do unusual things to compile the package, please try 406c321187Smrgto figure out how `configure' could check whether to do them, and mail 416c321187Smrgdiffs or instructions to the address given in the `README' so they can 426c321187Smrgbe considered for the next release. If you are using the cache, and at 436c321187Smrgsome point `config.cache' contains results you don't want to keep, you 446c321187Smrgmay remove or edit it. 456c321187Smrg 466c321187Smrg The file `configure.ac' (or `configure.in') is used to create 47e120bd27Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 48e120bd27Smrgyou want to change it or regenerate `configure' using a newer version 49e120bd27Smrgof `autoconf'. 506c321187Smrg 51198e4c3cSmrg The simplest way to compile this package is: 526c321187Smrg 536c321187Smrg 1. `cd' to the directory containing the package's source code and type 54e120bd27Smrg `./configure' to configure the package for your system. 556c321187Smrg 56e120bd27Smrg Running `configure' might take a while. While running, it prints 57e120bd27Smrg some messages telling which features it is checking for. 586c321187Smrg 596c321187Smrg 2. Type `make' to compile the package. 606c321187Smrg 616c321187Smrg 3. Optionally, type `make check' to run any self-tests that come with 62198e4c3cSmrg the package, generally using the just-built uninstalled binaries. 636c321187Smrg 646c321187Smrg 4. Type `make install' to install the programs and any data files and 65198e4c3cSmrg documentation. When installing into a prefix owned by root, it is 66198e4c3cSmrg recommended that the package be configured and built as a regular 67198e4c3cSmrg user, and only the `make install' phase executed with root 68198e4c3cSmrg privileges. 69198e4c3cSmrg 70198e4c3cSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71198e4c3cSmrg this time using the binaries in their final installed location. 72198e4c3cSmrg This target does not install anything. Running this target as a 73198e4c3cSmrg regular user, particularly if the prior `make install' required 74198e4c3cSmrg root privileges, verifies that the installation completed 75198e4c3cSmrg correctly. 76198e4c3cSmrg 77198e4c3cSmrg 6. You can remove the program binaries and object files from the 786c321187Smrg source code directory by typing `make clean'. To also remove the 796c321187Smrg files that `configure' created (so you can compile the package for 806c321187Smrg a different kind of computer), type `make distclean'. There is 816c321187Smrg also a `make maintainer-clean' target, but that is intended mainly 826c321187Smrg for the package's developers. If you use it, you may have to get 836c321187Smrg all sorts of other programs in order to regenerate files that came 846c321187Smrg with the distribution. 856c321187Smrg 86198e4c3cSmrg 7. Often, you can also type `make uninstall' to remove the installed 87198e4c3cSmrg files again. In practice, not all packages have tested that 88198e4c3cSmrg uninstallation works correctly, even though it is required by the 89198e4c3cSmrg GNU Coding Standards. 90198e4c3cSmrg 91198e4c3cSmrg 8. Some packages, particularly those that use Automake, provide `make 92198e4c3cSmrg distcheck', which can by used by developers to test that all other 93198e4c3cSmrg targets like `make install' and `make uninstall' work correctly. 94198e4c3cSmrg This target is generally not run by end users. 95e120bd27Smrg 966c321187SmrgCompilers and Options 976c321187Smrg===================== 986c321187Smrg 996c321187Smrg Some systems require unusual options for compilation or linking that 1006c321187Smrgthe `configure' script does not know about. Run `./configure --help' 1016c321187Smrgfor details on some of the pertinent environment variables. 1026c321187Smrg 1036c321187Smrg You can give `configure' initial values for configuration parameters 1046c321187Smrgby setting variables in the command line or in the environment. Here 1056c321187Smrgis an example: 1066c321187Smrg 107e120bd27Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1086c321187Smrg 1096c321187Smrg *Note Defining Variables::, for more details. 1106c321187Smrg 1116c321187SmrgCompiling For Multiple Architectures 1126c321187Smrg==================================== 1136c321187Smrg 1146c321187Smrg You can compile the package for more than one kind of computer at the 1156c321187Smrgsame time, by placing the object files for each architecture in their 116e120bd27Smrgown directory. To do this, you can use GNU `make'. `cd' to the 1176c321187Smrgdirectory where you want the object files and executables to go and run 1186c321187Smrgthe `configure' script. `configure' automatically checks for the 119198e4c3cSmrgsource code in the directory that `configure' is in and in `..'. This 120198e4c3cSmrgis known as a "VPATH" build. 1216c321187Smrg 122e120bd27Smrg With a non-GNU `make', it is safer to compile the package for one 123e120bd27Smrgarchitecture at a time in the source code directory. After you have 124e120bd27Smrginstalled the package for one architecture, use `make distclean' before 125e120bd27Smrgreconfiguring for another architecture. 126e120bd27Smrg 127e120bd27Smrg On MacOS X 10.5 and later systems, you can create libraries and 128e120bd27Smrgexecutables that work on multiple system types--known as "fat" or 129e120bd27Smrg"universal" binaries--by specifying multiple `-arch' options to the 130e120bd27Smrgcompiler but only a single `-arch' option to the preprocessor. Like 131e120bd27Smrgthis: 132e120bd27Smrg 133e120bd27Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134e120bd27Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135e120bd27Smrg CPP="gcc -E" CXXCPP="g++ -E" 136e120bd27Smrg 137e120bd27Smrg This is not guaranteed to produce working output in all cases, you 138e120bd27Smrgmay have to build one architecture at a time and combine the results 139e120bd27Smrgusing the `lipo' tool if you have problems. 1406c321187Smrg 1416c321187SmrgInstallation Names 1426c321187Smrg================== 1436c321187Smrg 144e120bd27Smrg By default, `make install' installs the package's commands under 145e120bd27Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 146e120bd27Smrgcan specify an installation prefix other than `/usr/local' by giving 147198e4c3cSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148198e4c3cSmrgabsolute file name. 1496c321187Smrg 1506c321187Smrg You can specify separate installation prefixes for 1516c321187Smrgarchitecture-specific files and architecture-independent files. If you 152e120bd27Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 153e120bd27SmrgPREFIX as the prefix for installing programs and libraries. 154e120bd27SmrgDocumentation and other data files still use the regular prefix. 1556c321187Smrg 1566c321187Smrg In addition, if you use an unusual directory layout you can give 157e120bd27Smrgoptions like `--bindir=DIR' to specify different values for particular 1586c321187Smrgkinds of files. Run `configure --help' for a list of the directories 159198e4c3cSmrgyou can set and what kinds of files go in them. In general, the 160198e4c3cSmrgdefault for these options is expressed in terms of `${prefix}', so that 161198e4c3cSmrgspecifying just `--prefix' will affect all of the other directory 162198e4c3cSmrgspecifications that were not explicitly provided. 163198e4c3cSmrg 164198e4c3cSmrg The most portable way to affect installation locations is to pass the 165198e4c3cSmrgcorrect locations to `configure'; however, many packages provide one or 166198e4c3cSmrgboth of the following shortcuts of passing variable assignments to the 167198e4c3cSmrg`make install' command line to change installation locations without 168198e4c3cSmrghaving to reconfigure or recompile. 169198e4c3cSmrg 170198e4c3cSmrg The first method involves providing an override variable for each 171198e4c3cSmrgaffected directory. For example, `make install 172198e4c3cSmrgprefix=/alternate/directory' will choose an alternate location for all 173198e4c3cSmrgdirectory configuration variables that were expressed in terms of 174198e4c3cSmrg`${prefix}'. Any directories that were specified during `configure', 175198e4c3cSmrgbut not in terms of `${prefix}', must each be overridden at install 176198e4c3cSmrgtime for the entire installation to be relocated. The approach of 177198e4c3cSmrgmakefile variable overrides for each directory variable is required by 178198e4c3cSmrgthe GNU Coding Standards, and ideally causes no recompilation. 179198e4c3cSmrgHowever, some platforms have known limitations with the semantics of 180198e4c3cSmrgshared libraries that end up requiring recompilation when using this 181198e4c3cSmrgmethod, particularly noticeable in packages that use GNU Libtool. 182198e4c3cSmrg 183198e4c3cSmrg The second method involves providing the `DESTDIR' variable. For 184198e4c3cSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 185198e4c3cSmrg`/alternate/directory' before all installation names. The approach of 186198e4c3cSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187198e4c3cSmrgdoes not work on platforms that have drive letters. On the other hand, 188198e4c3cSmrgit does better at avoiding recompilation issues, and works well even 189198e4c3cSmrgwhen some directory options were not specified in terms of `${prefix}' 190198e4c3cSmrgat `configure' time. 191198e4c3cSmrg 192198e4c3cSmrgOptional Features 193198e4c3cSmrg================= 1946c321187Smrg 1956c321187Smrg If the package supports it, you can cause programs to be installed 1966c321187Smrgwith an extra prefix or suffix on their names by giving `configure' the 1976c321187Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1986c321187Smrg 1996c321187Smrg Some packages pay attention to `--enable-FEATURE' options to 2006c321187Smrg`configure', where FEATURE indicates an optional part of the package. 2016c321187SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2026c321187Smrgis something like `gnu-as' or `x' (for the X Window System). The 2036c321187Smrg`README' should mention any `--enable-' and `--with-' options that the 2046c321187Smrgpackage recognizes. 2056c321187Smrg 2066c321187Smrg For packages that use the X Window System, `configure' can usually 2076c321187Smrgfind the X include and library files automatically, but if it doesn't, 2086c321187Smrgyou can use the `configure' options `--x-includes=DIR' and 2096c321187Smrg`--x-libraries=DIR' to specify their locations. 2106c321187Smrg 211198e4c3cSmrg Some packages offer the ability to configure how verbose the 212198e4c3cSmrgexecution of `make' will be. For these packages, running `./configure 213198e4c3cSmrg--enable-silent-rules' sets the default to minimal output, which can be 214198e4c3cSmrgoverridden with `make V=1'; while running `./configure 215198e4c3cSmrg--disable-silent-rules' sets the default to verbose, which can be 216198e4c3cSmrgoverridden with `make V=0'. 217198e4c3cSmrg 218e120bd27SmrgParticular systems 219e120bd27Smrg================== 220e120bd27Smrg 221e120bd27Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222e120bd27SmrgCC is not installed, it is recommended to use the following options in 223e120bd27Smrgorder to use an ANSI C compiler: 224e120bd27Smrg 225198e4c3cSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226e120bd27Smrg 227e120bd27Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228e120bd27Smrg 229198e4c3cSmrg HP-UX `make' updates targets which have the same time stamps as 230198e4c3cSmrgtheir prerequisites, which makes it generally unusable when shipped 231198e4c3cSmrggenerated files such as `configure' are involved. Use GNU `make' 232198e4c3cSmrginstead. 233198e4c3cSmrg 234e120bd27Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235e120bd27Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 236e120bd27Smrga workaround. If GNU CC is not installed, it is therefore recommended 237e120bd27Smrgto try 238e120bd27Smrg 239e120bd27Smrg ./configure CC="cc" 240e120bd27Smrg 241e120bd27Smrgand if that doesn't work, try 242e120bd27Smrg 243e120bd27Smrg ./configure CC="cc -nodtk" 244e120bd27Smrg 245198e4c3cSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246198e4c3cSmrgdirectory contains several dysfunctional programs; working variants of 247198e4c3cSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248198e4c3cSmrgin your `PATH', put it _after_ `/usr/bin'. 249198e4c3cSmrg 250198e4c3cSmrg On Haiku, software installed for all users goes in `/boot/common', 251198e4c3cSmrgnot `/usr/local'. It is recommended to use the following options: 252198e4c3cSmrg 253198e4c3cSmrg ./configure --prefix=/boot/common 254198e4c3cSmrg 2556c321187SmrgSpecifying the System Type 2566c321187Smrg========================== 2576c321187Smrg 2586c321187Smrg There may be some features `configure' cannot figure out 2596c321187Smrgautomatically, but needs to determine by the type of machine the package 2606c321187Smrgwill run on. Usually, assuming the package is built to be run on the 2616c321187Smrg_same_ architectures, `configure' can figure that out, but if it prints 2626c321187Smrga message saying it cannot guess the machine type, give it the 2636c321187Smrg`--build=TYPE' option. TYPE can either be a short name for the system 2646c321187Smrgtype, such as `sun4', or a canonical name which has the form: 2656c321187Smrg 2666c321187Smrg CPU-COMPANY-SYSTEM 2676c321187Smrg 2686c321187Smrgwhere SYSTEM can have one of these forms: 2696c321187Smrg 270198e4c3cSmrg OS 271198e4c3cSmrg KERNEL-OS 2726c321187Smrg 2736c321187Smrg See the file `config.sub' for the possible values of each field. If 2746c321187Smrg`config.sub' isn't included in this package, then this package doesn't 2756c321187Smrgneed to know the machine type. 2766c321187Smrg 2776c321187Smrg If you are _building_ compiler tools for cross-compiling, you should 278e120bd27Smrguse the option `--target=TYPE' to select the type of system they will 2796c321187Smrgproduce code for. 2806c321187Smrg 2816c321187Smrg If you want to _use_ a cross compiler, that generates code for a 2826c321187Smrgplatform different from the build platform, you should specify the 2836c321187Smrg"host" platform (i.e., that on which the generated programs will 2846c321187Smrgeventually be run) with `--host=TYPE'. 2856c321187Smrg 2866c321187SmrgSharing Defaults 2876c321187Smrg================ 2886c321187Smrg 2896c321187Smrg If you want to set default values for `configure' scripts to share, 2906c321187Smrgyou can create a site shell script called `config.site' that gives 2916c321187Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2926c321187Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2936c321187Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2946c321187Smrg`CONFIG_SITE' environment variable to the location of the site script. 2956c321187SmrgA warning: not all `configure' scripts look for a site script. 2966c321187Smrg 2976c321187SmrgDefining Variables 2986c321187Smrg================== 2996c321187Smrg 3006c321187Smrg Variables not defined in a site shell script can be set in the 3016c321187Smrgenvironment passed to `configure'. However, some packages may run 3026c321187Smrgconfigure again during the build, and the customized values of these 3036c321187Smrgvariables may be lost. In order to avoid this problem, you should set 3046c321187Smrgthem in the `configure' command line, using `VAR=value'. For example: 3056c321187Smrg 3066c321187Smrg ./configure CC=/usr/local2/bin/gcc 3076c321187Smrg 308e120bd27Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 3096c321187Smrgoverridden in the site shell script). 3106c321187Smrg 311e120bd27SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 312e120bd27Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 313e120bd27Smrg 314e120bd27Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 315e120bd27Smrg 3166c321187Smrg`configure' Invocation 3176c321187Smrg====================== 3186c321187Smrg 3196c321187Smrg `configure' recognizes the following options to control how it 3206c321187Smrgoperates. 3216c321187Smrg 3226c321187Smrg`--help' 3236c321187Smrg`-h' 324e120bd27Smrg Print a summary of all of the options to `configure', and exit. 325e120bd27Smrg 326e120bd27Smrg`--help=short' 327e120bd27Smrg`--help=recursive' 328e120bd27Smrg Print a summary of the options unique to this package's 329e120bd27Smrg `configure', and exit. The `short' variant lists options used 330e120bd27Smrg only in the top level, while the `recursive' variant lists options 331e120bd27Smrg also present in any nested packages. 3326c321187Smrg 3336c321187Smrg`--version' 3346c321187Smrg`-V' 3356c321187Smrg Print the version of Autoconf used to generate the `configure' 3366c321187Smrg script, and exit. 3376c321187Smrg 3386c321187Smrg`--cache-file=FILE' 3396c321187Smrg Enable the cache: use and save the results of the tests in FILE, 3406c321187Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3416c321187Smrg disable caching. 3426c321187Smrg 3436c321187Smrg`--config-cache' 3446c321187Smrg`-C' 3456c321187Smrg Alias for `--cache-file=config.cache'. 3466c321187Smrg 3476c321187Smrg`--quiet' 3486c321187Smrg`--silent' 3496c321187Smrg`-q' 3506c321187Smrg Do not print messages saying which checks are being made. To 3516c321187Smrg suppress all normal output, redirect it to `/dev/null' (any error 3526c321187Smrg messages will still be shown). 3536c321187Smrg 3546c321187Smrg`--srcdir=DIR' 3556c321187Smrg Look for the package's source code in directory DIR. Usually 3566c321187Smrg `configure' can determine that directory automatically. 3576c321187Smrg 358e120bd27Smrg`--prefix=DIR' 359198e4c3cSmrg Use DIR as the installation prefix. *note Installation Names:: 360e120bd27Smrg for more details, including other options available for fine-tuning 361e120bd27Smrg the installation locations. 362e120bd27Smrg 363e120bd27Smrg`--no-create' 364e120bd27Smrg`-n' 365e120bd27Smrg Run the configure checks, but stop before creating any output 366e120bd27Smrg files. 367e120bd27Smrg 3686c321187Smrg`configure' also accepts some other, not widely useful, options. Run 3696c321187Smrg`configure --help' for more details. 3706c321187Smrg 371