INSTALL revision 0c7e83b2
18f65982aSmrgInstallation Instructions 28f65982aSmrg************************* 38f65982aSmrg 40c7e83b2SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 50c7e83b2SmrgInc. 68f65982aSmrg 70c7e83b2Smrg Copying and distribution of this file, with or without modification, 80c7e83b2Smrgare permitted in any medium without royalty provided the copyright 90c7e83b2Smrgnotice and this notice are preserved. This file is offered as-is, 100c7e83b2Smrgwithout warranty of any kind. 118f65982aSmrg 128f65982aSmrgBasic Installation 138f65982aSmrg================== 148f65982aSmrg 158f65982aSmrg Briefly, the shell commands `./configure; make; make install' should 168f65982aSmrgconfigure, build, and install this package. The following 178f65982aSmrgmore-detailed instructions are generic; see the `README' file for 180c7e83b2Smrginstructions specific to this package. Some packages provide this 190c7e83b2Smrg`INSTALL' file but do not implement all of the features documented 200c7e83b2Smrgbelow. The lack of an optional feature in a given package is not 210c7e83b2Smrgnecessarily a bug. More recommendations for GNU packages can be found 220c7e83b2Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 238f65982aSmrg 248f65982aSmrg The `configure' shell script attempts to guess correct values for 258f65982aSmrgvarious system-dependent variables used during compilation. It uses 268f65982aSmrgthose values to create a `Makefile' in each directory of the package. 278f65982aSmrgIt may also create one or more `.h' files containing system-dependent 288f65982aSmrgdefinitions. Finally, it creates a shell script `config.status' that 298f65982aSmrgyou can run in the future to recreate the current configuration, and a 308f65982aSmrgfile `config.log' containing compiler output (useful mainly for 318f65982aSmrgdebugging `configure'). 328f65982aSmrg 338f65982aSmrg It can also use an optional file (typically called `config.cache' 348f65982aSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 358f65982aSmrgthe results of its tests to speed up reconfiguring. Caching is 368f65982aSmrgdisabled by default to prevent problems with accidental use of stale 378f65982aSmrgcache files. 388f65982aSmrg 398f65982aSmrg If you need to do unusual things to compile the package, please try 408f65982aSmrgto figure out how `configure' could check whether to do them, and mail 418f65982aSmrgdiffs or instructions to the address given in the `README' so they can 428f65982aSmrgbe considered for the next release. If you are using the cache, and at 438f65982aSmrgsome point `config.cache' contains results you don't want to keep, you 448f65982aSmrgmay remove or edit it. 458f65982aSmrg 468f65982aSmrg The file `configure.ac' (or `configure.in') is used to create 478f65982aSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 488f65982aSmrgyou want to change it or regenerate `configure' using a newer version 498f65982aSmrgof `autoconf'. 508f65982aSmrg 510c7e83b2Smrg The simplest way to compile this package is: 528f65982aSmrg 538f65982aSmrg 1. `cd' to the directory containing the package's source code and type 548f65982aSmrg `./configure' to configure the package for your system. 558f65982aSmrg 568f65982aSmrg Running `configure' might take a while. While running, it prints 578f65982aSmrg some messages telling which features it is checking for. 588f65982aSmrg 598f65982aSmrg 2. Type `make' to compile the package. 608f65982aSmrg 618f65982aSmrg 3. Optionally, type `make check' to run any self-tests that come with 620c7e83b2Smrg the package, generally using the just-built uninstalled binaries. 638f65982aSmrg 648f65982aSmrg 4. Type `make install' to install the programs and any data files and 650c7e83b2Smrg documentation. When installing into a prefix owned by root, it is 660c7e83b2Smrg recommended that the package be configured and built as a regular 670c7e83b2Smrg user, and only the `make install' phase executed with root 680c7e83b2Smrg privileges. 690c7e83b2Smrg 700c7e83b2Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 710c7e83b2Smrg this time using the binaries in their final installed location. 720c7e83b2Smrg This target does not install anything. Running this target as a 730c7e83b2Smrg regular user, particularly if the prior `make install' required 740c7e83b2Smrg root privileges, verifies that the installation completed 750c7e83b2Smrg correctly. 760c7e83b2Smrg 770c7e83b2Smrg 6. You can remove the program binaries and object files from the 788f65982aSmrg source code directory by typing `make clean'. To also remove the 798f65982aSmrg files that `configure' created (so you can compile the package for 808f65982aSmrg a different kind of computer), type `make distclean'. There is 818f65982aSmrg also a `make maintainer-clean' target, but that is intended mainly 828f65982aSmrg for the package's developers. If you use it, you may have to get 838f65982aSmrg all sorts of other programs in order to regenerate files that came 848f65982aSmrg with the distribution. 858f65982aSmrg 860c7e83b2Smrg 7. Often, you can also type `make uninstall' to remove the installed 870c7e83b2Smrg files again. In practice, not all packages have tested that 880c7e83b2Smrg uninstallation works correctly, even though it is required by the 890c7e83b2Smrg GNU Coding Standards. 900c7e83b2Smrg 910c7e83b2Smrg 8. Some packages, particularly those that use Automake, provide `make 920c7e83b2Smrg distcheck', which can by used by developers to test that all other 930c7e83b2Smrg targets like `make install' and `make uninstall' work correctly. 940c7e83b2Smrg This target is generally not run by end users. 958f65982aSmrg 968f65982aSmrgCompilers and Options 978f65982aSmrg===================== 988f65982aSmrg 998f65982aSmrg Some systems require unusual options for compilation or linking that 1008f65982aSmrgthe `configure' script does not know about. Run `./configure --help' 1018f65982aSmrgfor details on some of the pertinent environment variables. 1028f65982aSmrg 1038f65982aSmrg You can give `configure' initial values for configuration parameters 1048f65982aSmrgby setting variables in the command line or in the environment. Here 1058f65982aSmrgis an example: 1068f65982aSmrg 1078f65982aSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1088f65982aSmrg 1098f65982aSmrg *Note Defining Variables::, for more details. 1108f65982aSmrg 1118f65982aSmrgCompiling For Multiple Architectures 1128f65982aSmrg==================================== 1138f65982aSmrg 1148f65982aSmrg You can compile the package for more than one kind of computer at the 1158f65982aSmrgsame time, by placing the object files for each architecture in their 1168f65982aSmrgown directory. To do this, you can use GNU `make'. `cd' to the 1178f65982aSmrgdirectory where you want the object files and executables to go and run 1188f65982aSmrgthe `configure' script. `configure' automatically checks for the 1190c7e83b2Smrgsource code in the directory that `configure' is in and in `..'. This 1200c7e83b2Smrgis known as a "VPATH" build. 1218f65982aSmrg 1228f65982aSmrg With a non-GNU `make', it is safer to compile the package for one 1238f65982aSmrgarchitecture at a time in the source code directory. After you have 1248f65982aSmrginstalled the package for one architecture, use `make distclean' before 1258f65982aSmrgreconfiguring for another architecture. 1268f65982aSmrg 1278f65982aSmrg On MacOS X 10.5 and later systems, you can create libraries and 1288f65982aSmrgexecutables that work on multiple system types--known as "fat" or 1298f65982aSmrg"universal" binaries--by specifying multiple `-arch' options to the 1308f65982aSmrgcompiler but only a single `-arch' option to the preprocessor. Like 1318f65982aSmrgthis: 1328f65982aSmrg 1338f65982aSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1348f65982aSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1358f65982aSmrg CPP="gcc -E" CXXCPP="g++ -E" 1368f65982aSmrg 1378f65982aSmrg This is not guaranteed to produce working output in all cases, you 1388f65982aSmrgmay have to build one architecture at a time and combine the results 1398f65982aSmrgusing the `lipo' tool if you have problems. 1408f65982aSmrg 1418f65982aSmrgInstallation Names 1428f65982aSmrg================== 1438f65982aSmrg 1448f65982aSmrg By default, `make install' installs the package's commands under 1458f65982aSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1468f65982aSmrgcan specify an installation prefix other than `/usr/local' by giving 1470c7e83b2Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 1480c7e83b2Smrgabsolute file name. 1498f65982aSmrg 1508f65982aSmrg You can specify separate installation prefixes for 1518f65982aSmrgarchitecture-specific files and architecture-independent files. If you 1528f65982aSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1538f65982aSmrgPREFIX as the prefix for installing programs and libraries. 1548f65982aSmrgDocumentation and other data files still use the regular prefix. 1558f65982aSmrg 1568f65982aSmrg In addition, if you use an unusual directory layout you can give 1578f65982aSmrgoptions like `--bindir=DIR' to specify different values for particular 1588f65982aSmrgkinds of files. Run `configure --help' for a list of the directories 1590c7e83b2Smrgyou can set and what kinds of files go in them. In general, the 1600c7e83b2Smrgdefault for these options is expressed in terms of `${prefix}', so that 1610c7e83b2Smrgspecifying just `--prefix' will affect all of the other directory 1620c7e83b2Smrgspecifications that were not explicitly provided. 1630c7e83b2Smrg 1640c7e83b2Smrg The most portable way to affect installation locations is to pass the 1650c7e83b2Smrgcorrect locations to `configure'; however, many packages provide one or 1660c7e83b2Smrgboth of the following shortcuts of passing variable assignments to the 1670c7e83b2Smrg`make install' command line to change installation locations without 1680c7e83b2Smrghaving to reconfigure or recompile. 1690c7e83b2Smrg 1700c7e83b2Smrg The first method involves providing an override variable for each 1710c7e83b2Smrgaffected directory. For example, `make install 1720c7e83b2Smrgprefix=/alternate/directory' will choose an alternate location for all 1730c7e83b2Smrgdirectory configuration variables that were expressed in terms of 1740c7e83b2Smrg`${prefix}'. Any directories that were specified during `configure', 1750c7e83b2Smrgbut not in terms of `${prefix}', must each be overridden at install 1760c7e83b2Smrgtime for the entire installation to be relocated. The approach of 1770c7e83b2Smrgmakefile variable overrides for each directory variable is required by 1780c7e83b2Smrgthe GNU Coding Standards, and ideally causes no recompilation. 1790c7e83b2SmrgHowever, some platforms have known limitations with the semantics of 1800c7e83b2Smrgshared libraries that end up requiring recompilation when using this 1810c7e83b2Smrgmethod, particularly noticeable in packages that use GNU Libtool. 1820c7e83b2Smrg 1830c7e83b2Smrg The second method involves providing the `DESTDIR' variable. For 1840c7e83b2Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 1850c7e83b2Smrg`/alternate/directory' before all installation names. The approach of 1860c7e83b2Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 1870c7e83b2Smrgdoes not work on platforms that have drive letters. On the other hand, 1880c7e83b2Smrgit does better at avoiding recompilation issues, and works well even 1890c7e83b2Smrgwhen some directory options were not specified in terms of `${prefix}' 1900c7e83b2Smrgat `configure' time. 1910c7e83b2Smrg 1920c7e83b2SmrgOptional Features 1930c7e83b2Smrg================= 1948f65982aSmrg 1958f65982aSmrg If the package supports it, you can cause programs to be installed 1968f65982aSmrgwith an extra prefix or suffix on their names by giving `configure' the 1978f65982aSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1988f65982aSmrg 1998f65982aSmrg Some packages pay attention to `--enable-FEATURE' options to 2008f65982aSmrg`configure', where FEATURE indicates an optional part of the package. 2018f65982aSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2028f65982aSmrgis something like `gnu-as' or `x' (for the X Window System). The 2038f65982aSmrg`README' should mention any `--enable-' and `--with-' options that the 2048f65982aSmrgpackage recognizes. 2058f65982aSmrg 2068f65982aSmrg For packages that use the X Window System, `configure' can usually 2078f65982aSmrgfind the X include and library files automatically, but if it doesn't, 2088f65982aSmrgyou can use the `configure' options `--x-includes=DIR' and 2098f65982aSmrg`--x-libraries=DIR' to specify their locations. 2108f65982aSmrg 2110c7e83b2Smrg Some packages offer the ability to configure how verbose the 2120c7e83b2Smrgexecution of `make' will be. For these packages, running `./configure 2130c7e83b2Smrg--enable-silent-rules' sets the default to minimal output, which can be 2140c7e83b2Smrgoverridden with `make V=1'; while running `./configure 2150c7e83b2Smrg--disable-silent-rules' sets the default to verbose, which can be 2160c7e83b2Smrgoverridden with `make V=0'. 2170c7e83b2Smrg 2188f65982aSmrgParticular systems 2198f65982aSmrg================== 2208f65982aSmrg 2218f65982aSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2228f65982aSmrgCC is not installed, it is recommended to use the following options in 2238f65982aSmrgorder to use an ANSI C compiler: 2248f65982aSmrg 2250c7e83b2Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2268f65982aSmrg 2278f65982aSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2288f65982aSmrg 2290c7e83b2Smrg HP-UX `make' updates targets which have the same time stamps as 2300c7e83b2Smrgtheir prerequisites, which makes it generally unusable when shipped 2310c7e83b2Smrggenerated files such as `configure' are involved. Use GNU `make' 2320c7e83b2Smrginstead. 2330c7e83b2Smrg 2348f65982aSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2358f65982aSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2368f65982aSmrga workaround. If GNU CC is not installed, it is therefore recommended 2378f65982aSmrgto try 2388f65982aSmrg 2398f65982aSmrg ./configure CC="cc" 2408f65982aSmrg 2418f65982aSmrgand if that doesn't work, try 2428f65982aSmrg 2438f65982aSmrg ./configure CC="cc -nodtk" 2448f65982aSmrg 2450c7e83b2Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 2460c7e83b2Smrgdirectory contains several dysfunctional programs; working variants of 2470c7e83b2Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 2480c7e83b2Smrgin your `PATH', put it _after_ `/usr/bin'. 2490c7e83b2Smrg 2500c7e83b2Smrg On Haiku, software installed for all users goes in `/boot/common', 2510c7e83b2Smrgnot `/usr/local'. It is recommended to use the following options: 2520c7e83b2Smrg 2530c7e83b2Smrg ./configure --prefix=/boot/common 2540c7e83b2Smrg 2558f65982aSmrgSpecifying the System Type 2568f65982aSmrg========================== 2578f65982aSmrg 2588f65982aSmrg There may be some features `configure' cannot figure out 2598f65982aSmrgautomatically, but needs to determine by the type of machine the package 2608f65982aSmrgwill run on. Usually, assuming the package is built to be run on the 2618f65982aSmrg_same_ architectures, `configure' can figure that out, but if it prints 2628f65982aSmrga message saying it cannot guess the machine type, give it the 2638f65982aSmrg`--build=TYPE' option. TYPE can either be a short name for the system 2648f65982aSmrgtype, such as `sun4', or a canonical name which has the form: 2658f65982aSmrg 2668f65982aSmrg CPU-COMPANY-SYSTEM 2678f65982aSmrg 2688f65982aSmrgwhere SYSTEM can have one of these forms: 2698f65982aSmrg 2700c7e83b2Smrg OS 2710c7e83b2Smrg KERNEL-OS 2728f65982aSmrg 2738f65982aSmrg See the file `config.sub' for the possible values of each field. If 2748f65982aSmrg`config.sub' isn't included in this package, then this package doesn't 2758f65982aSmrgneed to know the machine type. 2768f65982aSmrg 2778f65982aSmrg If you are _building_ compiler tools for cross-compiling, you should 2788f65982aSmrguse the option `--target=TYPE' to select the type of system they will 2798f65982aSmrgproduce code for. 2808f65982aSmrg 2818f65982aSmrg If you want to _use_ a cross compiler, that generates code for a 2828f65982aSmrgplatform different from the build platform, you should specify the 2838f65982aSmrg"host" platform (i.e., that on which the generated programs will 2848f65982aSmrgeventually be run) with `--host=TYPE'. 2858f65982aSmrg 2868f65982aSmrgSharing Defaults 2878f65982aSmrg================ 2888f65982aSmrg 2898f65982aSmrg If you want to set default values for `configure' scripts to share, 2908f65982aSmrgyou can create a site shell script called `config.site' that gives 2918f65982aSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 2928f65982aSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2938f65982aSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2948f65982aSmrg`CONFIG_SITE' environment variable to the location of the site script. 2958f65982aSmrgA warning: not all `configure' scripts look for a site script. 2968f65982aSmrg 2978f65982aSmrgDefining Variables 2988f65982aSmrg================== 2998f65982aSmrg 3008f65982aSmrg Variables not defined in a site shell script can be set in the 3018f65982aSmrgenvironment passed to `configure'. However, some packages may run 3028f65982aSmrgconfigure again during the build, and the customized values of these 3038f65982aSmrgvariables may be lost. In order to avoid this problem, you should set 3048f65982aSmrgthem in the `configure' command line, using `VAR=value'. For example: 3058f65982aSmrg 3068f65982aSmrg ./configure CC=/usr/local2/bin/gcc 3078f65982aSmrg 3088f65982aSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 3098f65982aSmrgoverridden in the site shell script). 3108f65982aSmrg 3118f65982aSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3128f65982aSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3138f65982aSmrg 3148f65982aSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3158f65982aSmrg 3168f65982aSmrg`configure' Invocation 3178f65982aSmrg====================== 3188f65982aSmrg 3198f65982aSmrg `configure' recognizes the following options to control how it 3208f65982aSmrgoperates. 3218f65982aSmrg 3228f65982aSmrg`--help' 3238f65982aSmrg`-h' 3248f65982aSmrg Print a summary of all of the options to `configure', and exit. 3258f65982aSmrg 3268f65982aSmrg`--help=short' 3278f65982aSmrg`--help=recursive' 3288f65982aSmrg Print a summary of the options unique to this package's 3298f65982aSmrg `configure', and exit. The `short' variant lists options used 3308f65982aSmrg only in the top level, while the `recursive' variant lists options 3318f65982aSmrg also present in any nested packages. 3328f65982aSmrg 3338f65982aSmrg`--version' 3348f65982aSmrg`-V' 3358f65982aSmrg Print the version of Autoconf used to generate the `configure' 3368f65982aSmrg script, and exit. 3378f65982aSmrg 3388f65982aSmrg`--cache-file=FILE' 3398f65982aSmrg Enable the cache: use and save the results of the tests in FILE, 3408f65982aSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3418f65982aSmrg disable caching. 3428f65982aSmrg 3438f65982aSmrg`--config-cache' 3448f65982aSmrg`-C' 3458f65982aSmrg Alias for `--cache-file=config.cache'. 3468f65982aSmrg 3478f65982aSmrg`--quiet' 3488f65982aSmrg`--silent' 3498f65982aSmrg`-q' 3508f65982aSmrg Do not print messages saying which checks are being made. To 3518f65982aSmrg suppress all normal output, redirect it to `/dev/null' (any error 3528f65982aSmrg messages will still be shown). 3538f65982aSmrg 3548f65982aSmrg`--srcdir=DIR' 3558f65982aSmrg Look for the package's source code in directory DIR. Usually 3568f65982aSmrg `configure' can determine that directory automatically. 3578f65982aSmrg 3588f65982aSmrg`--prefix=DIR' 3590c7e83b2Smrg Use DIR as the installation prefix. *note Installation Names:: 3608f65982aSmrg for more details, including other options available for fine-tuning 3618f65982aSmrg the installation locations. 3628f65982aSmrg 3638f65982aSmrg`--no-create' 3648f65982aSmrg`-n' 3658f65982aSmrg Run the configure checks, but stop before creating any output 3668f65982aSmrg files. 3678f65982aSmrg 3688f65982aSmrg`configure' also accepts some other, not widely useful, options. Run 3698f65982aSmrg`configure --help' for more details. 3708f65982aSmrg 371