11c43011aSmrgInstallation Instructions 21c43011aSmrg************************* 31c43011aSmrg 448e37bc2SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 548e37bc2SmrgInc. 61c43011aSmrg 748e37bc2Smrg Copying and distribution of this file, with or without modification, 848e37bc2Smrgare permitted in any medium without royalty provided the copyright 948e37bc2Smrgnotice and this notice are preserved. This file is offered as-is, 1048e37bc2Smrgwithout warranty of any kind. 111c43011aSmrg 121c43011aSmrgBasic Installation 131c43011aSmrg================== 141c43011aSmrg 151c43011aSmrg Briefly, the shell commands `./configure; make; make install' should 161c43011aSmrgconfigure, build, and install this package. The following 171c43011aSmrgmore-detailed instructions are generic; see the `README' file for 1848e37bc2Smrginstructions specific to this package. Some packages provide this 1948e37bc2Smrg`INSTALL' file but do not implement all of the features documented 2048e37bc2Smrgbelow. The lack of an optional feature in a given package is not 2148e37bc2Smrgnecessarily a bug. More recommendations for GNU packages can be found 2248e37bc2Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 231c43011aSmrg 241c43011aSmrg The `configure' shell script attempts to guess correct values for 251c43011aSmrgvarious system-dependent variables used during compilation. It uses 261c43011aSmrgthose values to create a `Makefile' in each directory of the package. 271c43011aSmrgIt may also create one or more `.h' files containing system-dependent 281c43011aSmrgdefinitions. Finally, it creates a shell script `config.status' that 291c43011aSmrgyou can run in the future to recreate the current configuration, and a 301c43011aSmrgfile `config.log' containing compiler output (useful mainly for 311c43011aSmrgdebugging `configure'). 321c43011aSmrg 331c43011aSmrg It can also use an optional file (typically called `config.cache' 341c43011aSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 351c43011aSmrgthe results of its tests to speed up reconfiguring. Caching is 361c43011aSmrgdisabled by default to prevent problems with accidental use of stale 371c43011aSmrgcache files. 381c43011aSmrg 391c43011aSmrg If you need to do unusual things to compile the package, please try 401c43011aSmrgto figure out how `configure' could check whether to do them, and mail 411c43011aSmrgdiffs or instructions to the address given in the `README' so they can 421c43011aSmrgbe considered for the next release. If you are using the cache, and at 431c43011aSmrgsome point `config.cache' contains results you don't want to keep, you 441c43011aSmrgmay remove or edit it. 451c43011aSmrg 461c43011aSmrg The file `configure.ac' (or `configure.in') is used to create 471c43011aSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 481c43011aSmrgyou want to change it or regenerate `configure' using a newer version 491c43011aSmrgof `autoconf'. 501c43011aSmrg 5148e37bc2Smrg The simplest way to compile this package is: 521c43011aSmrg 531c43011aSmrg 1. `cd' to the directory containing the package's source code and type 541c43011aSmrg `./configure' to configure the package for your system. 551c43011aSmrg 561c43011aSmrg Running `configure' might take a while. While running, it prints 571c43011aSmrg some messages telling which features it is checking for. 581c43011aSmrg 591c43011aSmrg 2. Type `make' to compile the package. 601c43011aSmrg 611c43011aSmrg 3. Optionally, type `make check' to run any self-tests that come with 6248e37bc2Smrg the package, generally using the just-built uninstalled binaries. 631c43011aSmrg 641c43011aSmrg 4. Type `make install' to install the programs and any data files and 6548e37bc2Smrg documentation. When installing into a prefix owned by root, it is 6648e37bc2Smrg recommended that the package be configured and built as a regular 6748e37bc2Smrg user, and only the `make install' phase executed with root 6848e37bc2Smrg privileges. 6948e37bc2Smrg 7048e37bc2Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 7148e37bc2Smrg this time using the binaries in their final installed location. 7248e37bc2Smrg This target does not install anything. Running this target as a 7348e37bc2Smrg regular user, particularly if the prior `make install' required 7448e37bc2Smrg root privileges, verifies that the installation completed 7548e37bc2Smrg correctly. 7648e37bc2Smrg 7748e37bc2Smrg 6. You can remove the program binaries and object files from the 781c43011aSmrg source code directory by typing `make clean'. To also remove the 791c43011aSmrg files that `configure' created (so you can compile the package for 801c43011aSmrg a different kind of computer), type `make distclean'. There is 811c43011aSmrg also a `make maintainer-clean' target, but that is intended mainly 821c43011aSmrg for the package's developers. If you use it, you may have to get 831c43011aSmrg all sorts of other programs in order to regenerate files that came 841c43011aSmrg with the distribution. 851c43011aSmrg 8648e37bc2Smrg 7. Often, you can also type `make uninstall' to remove the installed 8748e37bc2Smrg files again. In practice, not all packages have tested that 8848e37bc2Smrg uninstallation works correctly, even though it is required by the 8948e37bc2Smrg GNU Coding Standards. 9048e37bc2Smrg 9148e37bc2Smrg 8. Some packages, particularly those that use Automake, provide `make 9248e37bc2Smrg distcheck', which can by used by developers to test that all other 9348e37bc2Smrg targets like `make install' and `make uninstall' work correctly. 9448e37bc2Smrg This target is generally not run by end users. 951c43011aSmrg 961c43011aSmrgCompilers and Options 971c43011aSmrg===================== 981c43011aSmrg 991c43011aSmrg Some systems require unusual options for compilation or linking that 1001c43011aSmrgthe `configure' script does not know about. Run `./configure --help' 1011c43011aSmrgfor details on some of the pertinent environment variables. 1021c43011aSmrg 1031c43011aSmrg You can give `configure' initial values for configuration parameters 1041c43011aSmrgby setting variables in the command line or in the environment. Here 1051c43011aSmrgis an example: 1061c43011aSmrg 1071c43011aSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1081c43011aSmrg 1091c43011aSmrg *Note Defining Variables::, for more details. 1101c43011aSmrg 1111c43011aSmrgCompiling For Multiple Architectures 1121c43011aSmrg==================================== 1131c43011aSmrg 1141c43011aSmrg You can compile the package for more than one kind of computer at the 1151c43011aSmrgsame time, by placing the object files for each architecture in their 1161c43011aSmrgown directory. To do this, you can use GNU `make'. `cd' to the 1171c43011aSmrgdirectory where you want the object files and executables to go and run 1181c43011aSmrgthe `configure' script. `configure' automatically checks for the 11948e37bc2Smrgsource code in the directory that `configure' is in and in `..'. This 12048e37bc2Smrgis known as a "VPATH" build. 1211c43011aSmrg 1221c43011aSmrg With a non-GNU `make', it is safer to compile the package for one 1231c43011aSmrgarchitecture at a time in the source code directory. After you have 1241c43011aSmrginstalled the package for one architecture, use `make distclean' before 1251c43011aSmrgreconfiguring for another architecture. 1261c43011aSmrg 1271c43011aSmrg On MacOS X 10.5 and later systems, you can create libraries and 1281c43011aSmrgexecutables that work on multiple system types--known as "fat" or 1291c43011aSmrg"universal" binaries--by specifying multiple `-arch' options to the 1301c43011aSmrgcompiler but only a single `-arch' option to the preprocessor. Like 1311c43011aSmrgthis: 1321c43011aSmrg 1331c43011aSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1341c43011aSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1351c43011aSmrg CPP="gcc -E" CXXCPP="g++ -E" 1361c43011aSmrg 1371c43011aSmrg This is not guaranteed to produce working output in all cases, you 1381c43011aSmrgmay have to build one architecture at a time and combine the results 1391c43011aSmrgusing the `lipo' tool if you have problems. 1401c43011aSmrg 1411c43011aSmrgInstallation Names 1421c43011aSmrg================== 1431c43011aSmrg 1441c43011aSmrg By default, `make install' installs the package's commands under 1451c43011aSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1461c43011aSmrgcan specify an installation prefix other than `/usr/local' by giving 14748e37bc2Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 14848e37bc2Smrgabsolute file name. 1491c43011aSmrg 1501c43011aSmrg You can specify separate installation prefixes for 1511c43011aSmrgarchitecture-specific files and architecture-independent files. If you 1521c43011aSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1531c43011aSmrgPREFIX as the prefix for installing programs and libraries. 1541c43011aSmrgDocumentation and other data files still use the regular prefix. 1551c43011aSmrg 1561c43011aSmrg In addition, if you use an unusual directory layout you can give 1571c43011aSmrgoptions like `--bindir=DIR' to specify different values for particular 1581c43011aSmrgkinds of files. Run `configure --help' for a list of the directories 15948e37bc2Smrgyou can set and what kinds of files go in them. In general, the 16048e37bc2Smrgdefault for these options is expressed in terms of `${prefix}', so that 16148e37bc2Smrgspecifying just `--prefix' will affect all of the other directory 16248e37bc2Smrgspecifications that were not explicitly provided. 16348e37bc2Smrg 16448e37bc2Smrg The most portable way to affect installation locations is to pass the 16548e37bc2Smrgcorrect locations to `configure'; however, many packages provide one or 16648e37bc2Smrgboth of the following shortcuts of passing variable assignments to the 16748e37bc2Smrg`make install' command line to change installation locations without 16848e37bc2Smrghaving to reconfigure or recompile. 16948e37bc2Smrg 17048e37bc2Smrg The first method involves providing an override variable for each 17148e37bc2Smrgaffected directory. For example, `make install 17248e37bc2Smrgprefix=/alternate/directory' will choose an alternate location for all 17348e37bc2Smrgdirectory configuration variables that were expressed in terms of 17448e37bc2Smrg`${prefix}'. Any directories that were specified during `configure', 17548e37bc2Smrgbut not in terms of `${prefix}', must each be overridden at install 17648e37bc2Smrgtime for the entire installation to be relocated. The approach of 17748e37bc2Smrgmakefile variable overrides for each directory variable is required by 17848e37bc2Smrgthe GNU Coding Standards, and ideally causes no recompilation. 17948e37bc2SmrgHowever, some platforms have known limitations with the semantics of 18048e37bc2Smrgshared libraries that end up requiring recompilation when using this 18148e37bc2Smrgmethod, particularly noticeable in packages that use GNU Libtool. 18248e37bc2Smrg 18348e37bc2Smrg The second method involves providing the `DESTDIR' variable. For 18448e37bc2Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 18548e37bc2Smrg`/alternate/directory' before all installation names. The approach of 18648e37bc2Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 18748e37bc2Smrgdoes not work on platforms that have drive letters. On the other hand, 18848e37bc2Smrgit does better at avoiding recompilation issues, and works well even 18948e37bc2Smrgwhen some directory options were not specified in terms of `${prefix}' 19048e37bc2Smrgat `configure' time. 19148e37bc2Smrg 19248e37bc2SmrgOptional Features 19348e37bc2Smrg================= 1941c43011aSmrg 1951c43011aSmrg If the package supports it, you can cause programs to be installed 1961c43011aSmrgwith an extra prefix or suffix on their names by giving `configure' the 1971c43011aSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1981c43011aSmrg 1991c43011aSmrg Some packages pay attention to `--enable-FEATURE' options to 2001c43011aSmrg`configure', where FEATURE indicates an optional part of the package. 2011c43011aSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2021c43011aSmrgis something like `gnu-as' or `x' (for the X Window System). The 2031c43011aSmrg`README' should mention any `--enable-' and `--with-' options that the 2041c43011aSmrgpackage recognizes. 2051c43011aSmrg 2061c43011aSmrg For packages that use the X Window System, `configure' can usually 2071c43011aSmrgfind the X include and library files automatically, but if it doesn't, 2081c43011aSmrgyou can use the `configure' options `--x-includes=DIR' and 2091c43011aSmrg`--x-libraries=DIR' to specify their locations. 2101c43011aSmrg 21148e37bc2Smrg Some packages offer the ability to configure how verbose the 21248e37bc2Smrgexecution of `make' will be. For these packages, running `./configure 21348e37bc2Smrg--enable-silent-rules' sets the default to minimal output, which can be 21448e37bc2Smrgoverridden with `make V=1'; while running `./configure 21548e37bc2Smrg--disable-silent-rules' sets the default to verbose, which can be 21648e37bc2Smrgoverridden with `make V=0'. 21748e37bc2Smrg 2181c43011aSmrgParticular systems 2191c43011aSmrg================== 2201c43011aSmrg 2211c43011aSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2221c43011aSmrgCC is not installed, it is recommended to use the following options in 2231c43011aSmrgorder to use an ANSI C compiler: 2241c43011aSmrg 22548e37bc2Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2261c43011aSmrg 2271c43011aSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2281c43011aSmrg 22948e37bc2Smrg HP-UX `make' updates targets which have the same time stamps as 23048e37bc2Smrgtheir prerequisites, which makes it generally unusable when shipped 23148e37bc2Smrggenerated files such as `configure' are involved. Use GNU `make' 23248e37bc2Smrginstead. 23348e37bc2Smrg 2341c43011aSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2351c43011aSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2361c43011aSmrga workaround. If GNU CC is not installed, it is therefore recommended 2371c43011aSmrgto try 2381c43011aSmrg 2391c43011aSmrg ./configure CC="cc" 2401c43011aSmrg 2411c43011aSmrgand if that doesn't work, try 2421c43011aSmrg 2431c43011aSmrg ./configure CC="cc -nodtk" 2441c43011aSmrg 24548e37bc2Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 24648e37bc2Smrgdirectory contains several dysfunctional programs; working variants of 24748e37bc2Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 24848e37bc2Smrgin your `PATH', put it _after_ `/usr/bin'. 24948e37bc2Smrg 25048e37bc2Smrg On Haiku, software installed for all users goes in `/boot/common', 25148e37bc2Smrgnot `/usr/local'. It is recommended to use the following options: 25248e37bc2Smrg 25348e37bc2Smrg ./configure --prefix=/boot/common 25448e37bc2Smrg 2551c43011aSmrgSpecifying the System Type 2561c43011aSmrg========================== 2571c43011aSmrg 2581c43011aSmrg There may be some features `configure' cannot figure out 2591c43011aSmrgautomatically, but needs to determine by the type of machine the package 2601c43011aSmrgwill run on. Usually, assuming the package is built to be run on the 2611c43011aSmrg_same_ architectures, `configure' can figure that out, but if it prints 2621c43011aSmrga message saying it cannot guess the machine type, give it the 2631c43011aSmrg`--build=TYPE' option. TYPE can either be a short name for the system 2641c43011aSmrgtype, such as `sun4', or a canonical name which has the form: 2651c43011aSmrg 2661c43011aSmrg CPU-COMPANY-SYSTEM 2671c43011aSmrg 2681c43011aSmrgwhere SYSTEM can have one of these forms: 2691c43011aSmrg 27048e37bc2Smrg OS 27148e37bc2Smrg KERNEL-OS 2721c43011aSmrg 2731c43011aSmrg See the file `config.sub' for the possible values of each field. If 2741c43011aSmrg`config.sub' isn't included in this package, then this package doesn't 2751c43011aSmrgneed to know the machine type. 2761c43011aSmrg 2771c43011aSmrg If you are _building_ compiler tools for cross-compiling, you should 2781c43011aSmrguse the option `--target=TYPE' to select the type of system they will 2791c43011aSmrgproduce code for. 2801c43011aSmrg 2811c43011aSmrg If you want to _use_ a cross compiler, that generates code for a 2821c43011aSmrgplatform different from the build platform, you should specify the 2831c43011aSmrg"host" platform (i.e., that on which the generated programs will 2841c43011aSmrgeventually be run) with `--host=TYPE'. 2851c43011aSmrg 2861c43011aSmrgSharing Defaults 2871c43011aSmrg================ 2881c43011aSmrg 2891c43011aSmrg If you want to set default values for `configure' scripts to share, 2901c43011aSmrgyou can create a site shell script called `config.site' that gives 2911c43011aSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 2921c43011aSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2931c43011aSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2941c43011aSmrg`CONFIG_SITE' environment variable to the location of the site script. 2951c43011aSmrgA warning: not all `configure' scripts look for a site script. 2961c43011aSmrg 2971c43011aSmrgDefining Variables 2981c43011aSmrg================== 2991c43011aSmrg 3001c43011aSmrg Variables not defined in a site shell script can be set in the 3011c43011aSmrgenvironment passed to `configure'. However, some packages may run 3021c43011aSmrgconfigure again during the build, and the customized values of these 3031c43011aSmrgvariables may be lost. In order to avoid this problem, you should set 3041c43011aSmrgthem in the `configure' command line, using `VAR=value'. For example: 3051c43011aSmrg 3061c43011aSmrg ./configure CC=/usr/local2/bin/gcc 3071c43011aSmrg 3081c43011aSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 3091c43011aSmrgoverridden in the site shell script). 3101c43011aSmrg 3111c43011aSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3121c43011aSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3131c43011aSmrg 3141c43011aSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3151c43011aSmrg 3161c43011aSmrg`configure' Invocation 3171c43011aSmrg====================== 3181c43011aSmrg 3191c43011aSmrg `configure' recognizes the following options to control how it 3201c43011aSmrgoperates. 3211c43011aSmrg 3221c43011aSmrg`--help' 3231c43011aSmrg`-h' 3241c43011aSmrg Print a summary of all of the options to `configure', and exit. 3251c43011aSmrg 3261c43011aSmrg`--help=short' 3271c43011aSmrg`--help=recursive' 3281c43011aSmrg Print a summary of the options unique to this package's 3291c43011aSmrg `configure', and exit. The `short' variant lists options used 3301c43011aSmrg only in the top level, while the `recursive' variant lists options 3311c43011aSmrg also present in any nested packages. 3321c43011aSmrg 3331c43011aSmrg`--version' 3341c43011aSmrg`-V' 3351c43011aSmrg Print the version of Autoconf used to generate the `configure' 3361c43011aSmrg script, and exit. 3371c43011aSmrg 3381c43011aSmrg`--cache-file=FILE' 3391c43011aSmrg Enable the cache: use and save the results of the tests in FILE, 3401c43011aSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3411c43011aSmrg disable caching. 3421c43011aSmrg 3431c43011aSmrg`--config-cache' 3441c43011aSmrg`-C' 3451c43011aSmrg Alias for `--cache-file=config.cache'. 3461c43011aSmrg 3471c43011aSmrg`--quiet' 3481c43011aSmrg`--silent' 3491c43011aSmrg`-q' 3501c43011aSmrg Do not print messages saying which checks are being made. To 3511c43011aSmrg suppress all normal output, redirect it to `/dev/null' (any error 3521c43011aSmrg messages will still be shown). 3531c43011aSmrg 3541c43011aSmrg`--srcdir=DIR' 3551c43011aSmrg Look for the package's source code in directory DIR. Usually 3561c43011aSmrg `configure' can determine that directory automatically. 3571c43011aSmrg 3581c43011aSmrg`--prefix=DIR' 35948e37bc2Smrg Use DIR as the installation prefix. *note Installation Names:: 3601c43011aSmrg for more details, including other options available for fine-tuning 3611c43011aSmrg the installation locations. 3621c43011aSmrg 3631c43011aSmrg`--no-create' 3641c43011aSmrg`-n' 3651c43011aSmrg Run the configure checks, but stop before creating any output 3661c43011aSmrg files. 3671c43011aSmrg 3681c43011aSmrg`configure' also accepts some other, not widely useful, options. Run 3691c43011aSmrg`configure --help' for more details. 3701c43011aSmrg 371