INSTALL revision b91640d3
11e5fa1c5SmrgInstallation Instructions 21e5fa1c5Smrg************************* 31e5fa1c5Smrg 4b91640d3SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5b91640d3SmrgInc. 61e5fa1c5Smrg 7b91640d3Smrg Copying and distribution of this file, with or without modification, 8b91640d3Smrgare permitted in any medium without royalty provided the copyright 9b91640d3Smrgnotice and this notice are preserved. This file is offered as-is, 10b91640d3Smrgwithout warranty of any kind. 111e5fa1c5Smrg 121e5fa1c5SmrgBasic Installation 131e5fa1c5Smrg================== 141e5fa1c5Smrg 151e5fa1c5Smrg Briefly, the shell commands `./configure; make; make install' should 161e5fa1c5Smrgconfigure, build, and install this package. The following 171e5fa1c5Smrgmore-detailed instructions are generic; see the `README' file for 18b91640d3Smrginstructions specific to this package. Some packages provide this 19b91640d3Smrg`INSTALL' file but do not implement all of the features documented 20b91640d3Smrgbelow. The lack of an optional feature in a given package is not 21b91640d3Smrgnecessarily a bug. More recommendations for GNU packages can be found 22b91640d3Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 231e5fa1c5Smrg 241e5fa1c5Smrg The `configure' shell script attempts to guess correct values for 251e5fa1c5Smrgvarious system-dependent variables used during compilation. It uses 261e5fa1c5Smrgthose values to create a `Makefile' in each directory of the package. 271e5fa1c5SmrgIt may also create one or more `.h' files containing system-dependent 281e5fa1c5Smrgdefinitions. Finally, it creates a shell script `config.status' that 291e5fa1c5Smrgyou can run in the future to recreate the current configuration, and a 301e5fa1c5Smrgfile `config.log' containing compiler output (useful mainly for 311e5fa1c5Smrgdebugging `configure'). 321e5fa1c5Smrg 331e5fa1c5Smrg It can also use an optional file (typically called `config.cache' 341e5fa1c5Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 351e5fa1c5Smrgthe results of its tests to speed up reconfiguring. Caching is 361e5fa1c5Smrgdisabled by default to prevent problems with accidental use of stale 371e5fa1c5Smrgcache files. 381e5fa1c5Smrg 391e5fa1c5Smrg If you need to do unusual things to compile the package, please try 401e5fa1c5Smrgto figure out how `configure' could check whether to do them, and mail 411e5fa1c5Smrgdiffs or instructions to the address given in the `README' so they can 421e5fa1c5Smrgbe considered for the next release. If you are using the cache, and at 431e5fa1c5Smrgsome point `config.cache' contains results you don't want to keep, you 441e5fa1c5Smrgmay remove or edit it. 451e5fa1c5Smrg 461e5fa1c5Smrg The file `configure.ac' (or `configure.in') is used to create 471e5fa1c5Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 481e5fa1c5Smrgyou want to change it or regenerate `configure' using a newer version 491e5fa1c5Smrgof `autoconf'. 501e5fa1c5Smrg 51b91640d3Smrg The simplest way to compile this package is: 521e5fa1c5Smrg 531e5fa1c5Smrg 1. `cd' to the directory containing the package's source code and type 541e5fa1c5Smrg `./configure' to configure the package for your system. 551e5fa1c5Smrg 561e5fa1c5Smrg Running `configure' might take a while. While running, it prints 571e5fa1c5Smrg some messages telling which features it is checking for. 581e5fa1c5Smrg 591e5fa1c5Smrg 2. Type `make' to compile the package. 601e5fa1c5Smrg 611e5fa1c5Smrg 3. Optionally, type `make check' to run any self-tests that come with 62b91640d3Smrg the package, generally using the just-built uninstalled binaries. 631e5fa1c5Smrg 641e5fa1c5Smrg 4. Type `make install' to install the programs and any data files and 65b91640d3Smrg documentation. When installing into a prefix owned by root, it is 66b91640d3Smrg recommended that the package be configured and built as a regular 67b91640d3Smrg user, and only the `make install' phase executed with root 68b91640d3Smrg privileges. 69b91640d3Smrg 70b91640d3Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71b91640d3Smrg this time using the binaries in their final installed location. 72b91640d3Smrg This target does not install anything. Running this target as a 73b91640d3Smrg regular user, particularly if the prior `make install' required 74b91640d3Smrg root privileges, verifies that the installation completed 75b91640d3Smrg correctly. 76b91640d3Smrg 77b91640d3Smrg 6. You can remove the program binaries and object files from the 781e5fa1c5Smrg source code directory by typing `make clean'. To also remove the 791e5fa1c5Smrg files that `configure' created (so you can compile the package for 801e5fa1c5Smrg a different kind of computer), type `make distclean'. There is 811e5fa1c5Smrg also a `make maintainer-clean' target, but that is intended mainly 821e5fa1c5Smrg for the package's developers. If you use it, you may have to get 831e5fa1c5Smrg all sorts of other programs in order to regenerate files that came 841e5fa1c5Smrg with the distribution. 851e5fa1c5Smrg 86b91640d3Smrg 7. Often, you can also type `make uninstall' to remove the installed 87b91640d3Smrg files again. In practice, not all packages have tested that 88b91640d3Smrg uninstallation works correctly, even though it is required by the 89b91640d3Smrg GNU Coding Standards. 90b91640d3Smrg 91b91640d3Smrg 8. Some packages, particularly those that use Automake, provide `make 92b91640d3Smrg distcheck', which can by used by developers to test that all other 93b91640d3Smrg targets like `make install' and `make uninstall' work correctly. 94b91640d3Smrg This target is generally not run by end users. 951e5fa1c5Smrg 961e5fa1c5SmrgCompilers and Options 971e5fa1c5Smrg===================== 981e5fa1c5Smrg 991e5fa1c5Smrg Some systems require unusual options for compilation or linking that 1001e5fa1c5Smrgthe `configure' script does not know about. Run `./configure --help' 1011e5fa1c5Smrgfor details on some of the pertinent environment variables. 1021e5fa1c5Smrg 1031e5fa1c5Smrg You can give `configure' initial values for configuration parameters 1041e5fa1c5Smrgby setting variables in the command line or in the environment. Here 1051e5fa1c5Smrgis an example: 1061e5fa1c5Smrg 1071e5fa1c5Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1081e5fa1c5Smrg 1091e5fa1c5Smrg *Note Defining Variables::, for more details. 1101e5fa1c5Smrg 1111e5fa1c5SmrgCompiling For Multiple Architectures 1121e5fa1c5Smrg==================================== 1131e5fa1c5Smrg 1141e5fa1c5Smrg You can compile the package for more than one kind of computer at the 1151e5fa1c5Smrgsame time, by placing the object files for each architecture in their 1161e5fa1c5Smrgown directory. To do this, you can use GNU `make'. `cd' to the 1171e5fa1c5Smrgdirectory where you want the object files and executables to go and run 1181e5fa1c5Smrgthe `configure' script. `configure' automatically checks for the 119b91640d3Smrgsource code in the directory that `configure' is in and in `..'. This 120b91640d3Smrgis known as a "VPATH" build. 1211e5fa1c5Smrg 1221e5fa1c5Smrg With a non-GNU `make', it is safer to compile the package for one 1231e5fa1c5Smrgarchitecture at a time in the source code directory. After you have 1241e5fa1c5Smrginstalled the package for one architecture, use `make distclean' before 1251e5fa1c5Smrgreconfiguring for another architecture. 1261e5fa1c5Smrg 1271e5fa1c5Smrg On MacOS X 10.5 and later systems, you can create libraries and 1281e5fa1c5Smrgexecutables that work on multiple system types--known as "fat" or 1291e5fa1c5Smrg"universal" binaries--by specifying multiple `-arch' options to the 1301e5fa1c5Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1311e5fa1c5Smrgthis: 1321e5fa1c5Smrg 1331e5fa1c5Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1341e5fa1c5Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1351e5fa1c5Smrg CPP="gcc -E" CXXCPP="g++ -E" 1361e5fa1c5Smrg 1371e5fa1c5Smrg This is not guaranteed to produce working output in all cases, you 1381e5fa1c5Smrgmay have to build one architecture at a time and combine the results 1391e5fa1c5Smrgusing the `lipo' tool if you have problems. 1401e5fa1c5Smrg 1411e5fa1c5SmrgInstallation Names 1421e5fa1c5Smrg================== 1431e5fa1c5Smrg 1441e5fa1c5Smrg By default, `make install' installs the package's commands under 1451e5fa1c5Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1461e5fa1c5Smrgcan specify an installation prefix other than `/usr/local' by giving 147b91640d3Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148b91640d3Smrgabsolute file name. 1491e5fa1c5Smrg 1501e5fa1c5Smrg You can specify separate installation prefixes for 1511e5fa1c5Smrgarchitecture-specific files and architecture-independent files. If you 1521e5fa1c5Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1531e5fa1c5SmrgPREFIX as the prefix for installing programs and libraries. 1541e5fa1c5SmrgDocumentation and other data files still use the regular prefix. 1551e5fa1c5Smrg 1561e5fa1c5Smrg In addition, if you use an unusual directory layout you can give 1571e5fa1c5Smrgoptions like `--bindir=DIR' to specify different values for particular 1581e5fa1c5Smrgkinds of files. Run `configure --help' for a list of the directories 159b91640d3Smrgyou can set and what kinds of files go in them. In general, the 160b91640d3Smrgdefault for these options is expressed in terms of `${prefix}', so that 161b91640d3Smrgspecifying just `--prefix' will affect all of the other directory 162b91640d3Smrgspecifications that were not explicitly provided. 163b91640d3Smrg 164b91640d3Smrg The most portable way to affect installation locations is to pass the 165b91640d3Smrgcorrect locations to `configure'; however, many packages provide one or 166b91640d3Smrgboth of the following shortcuts of passing variable assignments to the 167b91640d3Smrg`make install' command line to change installation locations without 168b91640d3Smrghaving to reconfigure or recompile. 169b91640d3Smrg 170b91640d3Smrg The first method involves providing an override variable for each 171b91640d3Smrgaffected directory. For example, `make install 172b91640d3Smrgprefix=/alternate/directory' will choose an alternate location for all 173b91640d3Smrgdirectory configuration variables that were expressed in terms of 174b91640d3Smrg`${prefix}'. Any directories that were specified during `configure', 175b91640d3Smrgbut not in terms of `${prefix}', must each be overridden at install 176b91640d3Smrgtime for the entire installation to be relocated. The approach of 177b91640d3Smrgmakefile variable overrides for each directory variable is required by 178b91640d3Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179b91640d3SmrgHowever, some platforms have known limitations with the semantics of 180b91640d3Smrgshared libraries that end up requiring recompilation when using this 181b91640d3Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182b91640d3Smrg 183b91640d3Smrg The second method involves providing the `DESTDIR' variable. For 184b91640d3Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185b91640d3Smrg`/alternate/directory' before all installation names. The approach of 186b91640d3Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187b91640d3Smrgdoes not work on platforms that have drive letters. On the other hand, 188b91640d3Smrgit does better at avoiding recompilation issues, and works well even 189b91640d3Smrgwhen some directory options were not specified in terms of `${prefix}' 190b91640d3Smrgat `configure' time. 191b91640d3Smrg 192b91640d3SmrgOptional Features 193b91640d3Smrg================= 1941e5fa1c5Smrg 1951e5fa1c5Smrg If the package supports it, you can cause programs to be installed 1961e5fa1c5Smrgwith an extra prefix or suffix on their names by giving `configure' the 1971e5fa1c5Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1981e5fa1c5Smrg 1991e5fa1c5Smrg Some packages pay attention to `--enable-FEATURE' options to 2001e5fa1c5Smrg`configure', where FEATURE indicates an optional part of the package. 2011e5fa1c5SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2021e5fa1c5Smrgis something like `gnu-as' or `x' (for the X Window System). The 2031e5fa1c5Smrg`README' should mention any `--enable-' and `--with-' options that the 2041e5fa1c5Smrgpackage recognizes. 2051e5fa1c5Smrg 2061e5fa1c5Smrg For packages that use the X Window System, `configure' can usually 2071e5fa1c5Smrgfind the X include and library files automatically, but if it doesn't, 2081e5fa1c5Smrgyou can use the `configure' options `--x-includes=DIR' and 2091e5fa1c5Smrg`--x-libraries=DIR' to specify their locations. 2101e5fa1c5Smrg 211b91640d3Smrg Some packages offer the ability to configure how verbose the 212b91640d3Smrgexecution of `make' will be. For these packages, running `./configure 213b91640d3Smrg--enable-silent-rules' sets the default to minimal output, which can be 214b91640d3Smrgoverridden with `make V=1'; while running `./configure 215b91640d3Smrg--disable-silent-rules' sets the default to verbose, which can be 216b91640d3Smrgoverridden with `make V=0'. 217b91640d3Smrg 2181e5fa1c5SmrgParticular systems 2191e5fa1c5Smrg================== 2201e5fa1c5Smrg 2211e5fa1c5Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2221e5fa1c5SmrgCC is not installed, it is recommended to use the following options in 2231e5fa1c5Smrgorder to use an ANSI C compiler: 2241e5fa1c5Smrg 225b91640d3Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2261e5fa1c5Smrg 2271e5fa1c5Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2281e5fa1c5Smrg 229b91640d3Smrg HP-UX `make' updates targets which have the same time stamps as 230b91640d3Smrgtheir prerequisites, which makes it generally unusable when shipped 231b91640d3Smrggenerated files such as `configure' are involved. Use GNU `make' 232b91640d3Smrginstead. 233b91640d3Smrg 2341e5fa1c5Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2351e5fa1c5Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2361e5fa1c5Smrga workaround. If GNU CC is not installed, it is therefore recommended 2371e5fa1c5Smrgto try 2381e5fa1c5Smrg 2391e5fa1c5Smrg ./configure CC="cc" 2401e5fa1c5Smrg 2411e5fa1c5Smrgand if that doesn't work, try 2421e5fa1c5Smrg 2431e5fa1c5Smrg ./configure CC="cc -nodtk" 2441e5fa1c5Smrg 245b91640d3Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246b91640d3Smrgdirectory contains several dysfunctional programs; working variants of 247b91640d3Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248b91640d3Smrgin your `PATH', put it _after_ `/usr/bin'. 249b91640d3Smrg 250b91640d3Smrg On Haiku, software installed for all users goes in `/boot/common', 251b91640d3Smrgnot `/usr/local'. It is recommended to use the following options: 252b91640d3Smrg 253b91640d3Smrg ./configure --prefix=/boot/common 254b91640d3Smrg 2551e5fa1c5SmrgSpecifying the System Type 2561e5fa1c5Smrg========================== 2571e5fa1c5Smrg 2581e5fa1c5Smrg There may be some features `configure' cannot figure out 2591e5fa1c5Smrgautomatically, but needs to determine by the type of machine the package 2601e5fa1c5Smrgwill run on. Usually, assuming the package is built to be run on the 2611e5fa1c5Smrg_same_ architectures, `configure' can figure that out, but if it prints 2621e5fa1c5Smrga message saying it cannot guess the machine type, give it the 2631e5fa1c5Smrg`--build=TYPE' option. TYPE can either be a short name for the system 2641e5fa1c5Smrgtype, such as `sun4', or a canonical name which has the form: 2651e5fa1c5Smrg 2661e5fa1c5Smrg CPU-COMPANY-SYSTEM 2671e5fa1c5Smrg 2681e5fa1c5Smrgwhere SYSTEM can have one of these forms: 2691e5fa1c5Smrg 270b91640d3Smrg OS 271b91640d3Smrg KERNEL-OS 2721e5fa1c5Smrg 2731e5fa1c5Smrg See the file `config.sub' for the possible values of each field. If 2741e5fa1c5Smrg`config.sub' isn't included in this package, then this package doesn't 2751e5fa1c5Smrgneed to know the machine type. 2761e5fa1c5Smrg 2771e5fa1c5Smrg If you are _building_ compiler tools for cross-compiling, you should 2781e5fa1c5Smrguse the option `--target=TYPE' to select the type of system they will 2791e5fa1c5Smrgproduce code for. 2801e5fa1c5Smrg 2811e5fa1c5Smrg If you want to _use_ a cross compiler, that generates code for a 2821e5fa1c5Smrgplatform different from the build platform, you should specify the 2831e5fa1c5Smrg"host" platform (i.e., that on which the generated programs will 2841e5fa1c5Smrgeventually be run) with `--host=TYPE'. 2851e5fa1c5Smrg 2861e5fa1c5SmrgSharing Defaults 2871e5fa1c5Smrg================ 2881e5fa1c5Smrg 2891e5fa1c5Smrg If you want to set default values for `configure' scripts to share, 2901e5fa1c5Smrgyou can create a site shell script called `config.site' that gives 2911e5fa1c5Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2921e5fa1c5Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2931e5fa1c5Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2941e5fa1c5Smrg`CONFIG_SITE' environment variable to the location of the site script. 2951e5fa1c5SmrgA warning: not all `configure' scripts look for a site script. 2961e5fa1c5Smrg 2971e5fa1c5SmrgDefining Variables 2981e5fa1c5Smrg================== 2991e5fa1c5Smrg 3001e5fa1c5Smrg Variables not defined in a site shell script can be set in the 3011e5fa1c5Smrgenvironment passed to `configure'. However, some packages may run 3021e5fa1c5Smrgconfigure again during the build, and the customized values of these 3031e5fa1c5Smrgvariables may be lost. In order to avoid this problem, you should set 3041e5fa1c5Smrgthem in the `configure' command line, using `VAR=value'. For example: 3051e5fa1c5Smrg 3061e5fa1c5Smrg ./configure CC=/usr/local2/bin/gcc 3071e5fa1c5Smrg 3081e5fa1c5Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 3091e5fa1c5Smrgoverridden in the site shell script). 3101e5fa1c5Smrg 3111e5fa1c5SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3121e5fa1c5Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3131e5fa1c5Smrg 3141e5fa1c5Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3151e5fa1c5Smrg 3161e5fa1c5Smrg`configure' Invocation 3171e5fa1c5Smrg====================== 3181e5fa1c5Smrg 3191e5fa1c5Smrg `configure' recognizes the following options to control how it 3201e5fa1c5Smrgoperates. 3211e5fa1c5Smrg 3221e5fa1c5Smrg`--help' 3231e5fa1c5Smrg`-h' 3241e5fa1c5Smrg Print a summary of all of the options to `configure', and exit. 3251e5fa1c5Smrg 3261e5fa1c5Smrg`--help=short' 3271e5fa1c5Smrg`--help=recursive' 3281e5fa1c5Smrg Print a summary of the options unique to this package's 3291e5fa1c5Smrg `configure', and exit. The `short' variant lists options used 3301e5fa1c5Smrg only in the top level, while the `recursive' variant lists options 3311e5fa1c5Smrg also present in any nested packages. 3321e5fa1c5Smrg 3331e5fa1c5Smrg`--version' 3341e5fa1c5Smrg`-V' 3351e5fa1c5Smrg Print the version of Autoconf used to generate the `configure' 3361e5fa1c5Smrg script, and exit. 3371e5fa1c5Smrg 3381e5fa1c5Smrg`--cache-file=FILE' 3391e5fa1c5Smrg Enable the cache: use and save the results of the tests in FILE, 3401e5fa1c5Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3411e5fa1c5Smrg disable caching. 3421e5fa1c5Smrg 3431e5fa1c5Smrg`--config-cache' 3441e5fa1c5Smrg`-C' 3451e5fa1c5Smrg Alias for `--cache-file=config.cache'. 3461e5fa1c5Smrg 3471e5fa1c5Smrg`--quiet' 3481e5fa1c5Smrg`--silent' 3491e5fa1c5Smrg`-q' 3501e5fa1c5Smrg Do not print messages saying which checks are being made. To 3511e5fa1c5Smrg suppress all normal output, redirect it to `/dev/null' (any error 3521e5fa1c5Smrg messages will still be shown). 3531e5fa1c5Smrg 3541e5fa1c5Smrg`--srcdir=DIR' 3551e5fa1c5Smrg Look for the package's source code in directory DIR. Usually 3561e5fa1c5Smrg `configure' can determine that directory automatically. 3571e5fa1c5Smrg 3581e5fa1c5Smrg`--prefix=DIR' 359b91640d3Smrg Use DIR as the installation prefix. *note Installation Names:: 3601e5fa1c5Smrg for more details, including other options available for fine-tuning 3611e5fa1c5Smrg the installation locations. 3621e5fa1c5Smrg 3631e5fa1c5Smrg`--no-create' 3641e5fa1c5Smrg`-n' 3651e5fa1c5Smrg Run the configure checks, but stop before creating any output 3661e5fa1c5Smrg files. 3671e5fa1c5Smrg 3681e5fa1c5Smrg`configure' also accepts some other, not widely useful, options. Run 3691e5fa1c5Smrg`configure --help' for more details. 3701e5fa1c5Smrg 371