14028d71eSmrgInstallation Instructions 24028d71eSmrg************************* 34028d71eSmrg 46c19a6d3SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 56c19a6d3SmrgInc. 64028d71eSmrg 76c19a6d3Smrg Copying and distribution of this file, with or without modification, 86c19a6d3Smrgare permitted in any medium without royalty provided the copyright 96c19a6d3Smrgnotice and this notice are preserved. This file is offered as-is, 106c19a6d3Smrgwithout warranty of any kind. 114028d71eSmrg 124028d71eSmrgBasic Installation 134028d71eSmrg================== 144028d71eSmrg 154028d71eSmrg Briefly, the shell commands `./configure; make; make install' should 164028d71eSmrgconfigure, build, and install this package. The following 174028d71eSmrgmore-detailed instructions are generic; see the `README' file for 186c19a6d3Smrginstructions specific to this package. Some packages provide this 196c19a6d3Smrg`INSTALL' file but do not implement all of the features documented 206c19a6d3Smrgbelow. The lack of an optional feature in a given package is not 216c19a6d3Smrgnecessarily a bug. More recommendations for GNU packages can be found 226c19a6d3Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 234028d71eSmrg 244028d71eSmrg The `configure' shell script attempts to guess correct values for 254028d71eSmrgvarious system-dependent variables used during compilation. It uses 264028d71eSmrgthose values to create a `Makefile' in each directory of the package. 274028d71eSmrgIt may also create one or more `.h' files containing system-dependent 284028d71eSmrgdefinitions. Finally, it creates a shell script `config.status' that 294028d71eSmrgyou can run in the future to recreate the current configuration, and a 304028d71eSmrgfile `config.log' containing compiler output (useful mainly for 314028d71eSmrgdebugging `configure'). 324028d71eSmrg 334028d71eSmrg It can also use an optional file (typically called `config.cache' 344028d71eSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 354028d71eSmrgthe results of its tests to speed up reconfiguring. Caching is 364028d71eSmrgdisabled by default to prevent problems with accidental use of stale 374028d71eSmrgcache files. 384028d71eSmrg 394028d71eSmrg If you need to do unusual things to compile the package, please try 404028d71eSmrgto figure out how `configure' could check whether to do them, and mail 414028d71eSmrgdiffs or instructions to the address given in the `README' so they can 424028d71eSmrgbe considered for the next release. If you are using the cache, and at 434028d71eSmrgsome point `config.cache' contains results you don't want to keep, you 444028d71eSmrgmay remove or edit it. 454028d71eSmrg 464028d71eSmrg The file `configure.ac' (or `configure.in') is used to create 474028d71eSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 484028d71eSmrgyou want to change it or regenerate `configure' using a newer version 494028d71eSmrgof `autoconf'. 504028d71eSmrg 516c19a6d3Smrg The simplest way to compile this package is: 524028d71eSmrg 534028d71eSmrg 1. `cd' to the directory containing the package's source code and type 544028d71eSmrg `./configure' to configure the package for your system. 554028d71eSmrg 564028d71eSmrg Running `configure' might take a while. While running, it prints 574028d71eSmrg some messages telling which features it is checking for. 584028d71eSmrg 594028d71eSmrg 2. Type `make' to compile the package. 604028d71eSmrg 614028d71eSmrg 3. Optionally, type `make check' to run any self-tests that come with 626c19a6d3Smrg the package, generally using the just-built uninstalled binaries. 634028d71eSmrg 644028d71eSmrg 4. Type `make install' to install the programs and any data files and 656c19a6d3Smrg documentation. When installing into a prefix owned by root, it is 666c19a6d3Smrg recommended that the package be configured and built as a regular 676c19a6d3Smrg user, and only the `make install' phase executed with root 686c19a6d3Smrg privileges. 696c19a6d3Smrg 706c19a6d3Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 716c19a6d3Smrg this time using the binaries in their final installed location. 726c19a6d3Smrg This target does not install anything. Running this target as a 736c19a6d3Smrg regular user, particularly if the prior `make install' required 746c19a6d3Smrg root privileges, verifies that the installation completed 756c19a6d3Smrg correctly. 766c19a6d3Smrg 776c19a6d3Smrg 6. You can remove the program binaries and object files from the 784028d71eSmrg source code directory by typing `make clean'. To also remove the 794028d71eSmrg files that `configure' created (so you can compile the package for 804028d71eSmrg a different kind of computer), type `make distclean'. There is 814028d71eSmrg also a `make maintainer-clean' target, but that is intended mainly 824028d71eSmrg for the package's developers. If you use it, you may have to get 834028d71eSmrg all sorts of other programs in order to regenerate files that came 844028d71eSmrg with the distribution. 854028d71eSmrg 866c19a6d3Smrg 7. Often, you can also type `make uninstall' to remove the installed 876c19a6d3Smrg files again. In practice, not all packages have tested that 886c19a6d3Smrg uninstallation works correctly, even though it is required by the 896c19a6d3Smrg GNU Coding Standards. 906c19a6d3Smrg 916c19a6d3Smrg 8. Some packages, particularly those that use Automake, provide `make 926c19a6d3Smrg distcheck', which can by used by developers to test that all other 936c19a6d3Smrg targets like `make install' and `make uninstall' work correctly. 946c19a6d3Smrg This target is generally not run by end users. 954028d71eSmrg 964028d71eSmrgCompilers and Options 974028d71eSmrg===================== 984028d71eSmrg 994028d71eSmrg Some systems require unusual options for compilation or linking that 1004028d71eSmrgthe `configure' script does not know about. Run `./configure --help' 1014028d71eSmrgfor details on some of the pertinent environment variables. 1024028d71eSmrg 1034028d71eSmrg You can give `configure' initial values for configuration parameters 1044028d71eSmrgby setting variables in the command line or in the environment. Here 1054028d71eSmrgis an example: 1064028d71eSmrg 1074028d71eSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1084028d71eSmrg 1094028d71eSmrg *Note Defining Variables::, for more details. 1104028d71eSmrg 1114028d71eSmrgCompiling For Multiple Architectures 1124028d71eSmrg==================================== 1134028d71eSmrg 1144028d71eSmrg You can compile the package for more than one kind of computer at the 1154028d71eSmrgsame time, by placing the object files for each architecture in their 1164028d71eSmrgown directory. To do this, you can use GNU `make'. `cd' to the 1174028d71eSmrgdirectory where you want the object files and executables to go and run 1184028d71eSmrgthe `configure' script. `configure' automatically checks for the 1196c19a6d3Smrgsource code in the directory that `configure' is in and in `..'. This 1206c19a6d3Smrgis known as a "VPATH" build. 1214028d71eSmrg 1224028d71eSmrg With a non-GNU `make', it is safer to compile the package for one 1234028d71eSmrgarchitecture at a time in the source code directory. After you have 1244028d71eSmrginstalled the package for one architecture, use `make distclean' before 1254028d71eSmrgreconfiguring for another architecture. 1264028d71eSmrg 1274028d71eSmrg On MacOS X 10.5 and later systems, you can create libraries and 1284028d71eSmrgexecutables that work on multiple system types--known as "fat" or 1294028d71eSmrg"universal" binaries--by specifying multiple `-arch' options to the 1304028d71eSmrgcompiler but only a single `-arch' option to the preprocessor. Like 1314028d71eSmrgthis: 1324028d71eSmrg 1334028d71eSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1344028d71eSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1354028d71eSmrg CPP="gcc -E" CXXCPP="g++ -E" 1364028d71eSmrg 1374028d71eSmrg This is not guaranteed to produce working output in all cases, you 1384028d71eSmrgmay have to build one architecture at a time and combine the results 1394028d71eSmrgusing the `lipo' tool if you have problems. 1404028d71eSmrg 1414028d71eSmrgInstallation Names 1424028d71eSmrg================== 1434028d71eSmrg 1444028d71eSmrg By default, `make install' installs the package's commands under 1454028d71eSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1464028d71eSmrgcan specify an installation prefix other than `/usr/local' by giving 1476c19a6d3Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 1486c19a6d3Smrgabsolute file name. 1494028d71eSmrg 1504028d71eSmrg You can specify separate installation prefixes for 1514028d71eSmrgarchitecture-specific files and architecture-independent files. If you 1524028d71eSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1534028d71eSmrgPREFIX as the prefix for installing programs and libraries. 1544028d71eSmrgDocumentation and other data files still use the regular prefix. 1554028d71eSmrg 1564028d71eSmrg In addition, if you use an unusual directory layout you can give 1574028d71eSmrgoptions like `--bindir=DIR' to specify different values for particular 1584028d71eSmrgkinds of files. Run `configure --help' for a list of the directories 1596c19a6d3Smrgyou can set and what kinds of files go in them. In general, the 1606c19a6d3Smrgdefault for these options is expressed in terms of `${prefix}', so that 1616c19a6d3Smrgspecifying just `--prefix' will affect all of the other directory 1626c19a6d3Smrgspecifications that were not explicitly provided. 1636c19a6d3Smrg 1646c19a6d3Smrg The most portable way to affect installation locations is to pass the 1656c19a6d3Smrgcorrect locations to `configure'; however, many packages provide one or 1666c19a6d3Smrgboth of the following shortcuts of passing variable assignments to the 1676c19a6d3Smrg`make install' command line to change installation locations without 1686c19a6d3Smrghaving to reconfigure or recompile. 1696c19a6d3Smrg 1706c19a6d3Smrg The first method involves providing an override variable for each 1716c19a6d3Smrgaffected directory. For example, `make install 1726c19a6d3Smrgprefix=/alternate/directory' will choose an alternate location for all 1736c19a6d3Smrgdirectory configuration variables that were expressed in terms of 1746c19a6d3Smrg`${prefix}'. Any directories that were specified during `configure', 1756c19a6d3Smrgbut not in terms of `${prefix}', must each be overridden at install 1766c19a6d3Smrgtime for the entire installation to be relocated. The approach of 1776c19a6d3Smrgmakefile variable overrides for each directory variable is required by 1786c19a6d3Smrgthe GNU Coding Standards, and ideally causes no recompilation. 1796c19a6d3SmrgHowever, some platforms have known limitations with the semantics of 1806c19a6d3Smrgshared libraries that end up requiring recompilation when using this 1816c19a6d3Smrgmethod, particularly noticeable in packages that use GNU Libtool. 1826c19a6d3Smrg 1836c19a6d3Smrg The second method involves providing the `DESTDIR' variable. For 1846c19a6d3Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 1856c19a6d3Smrg`/alternate/directory' before all installation names. The approach of 1866c19a6d3Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 1876c19a6d3Smrgdoes not work on platforms that have drive letters. On the other hand, 1886c19a6d3Smrgit does better at avoiding recompilation issues, and works well even 1896c19a6d3Smrgwhen some directory options were not specified in terms of `${prefix}' 1906c19a6d3Smrgat `configure' time. 1916c19a6d3Smrg 1926c19a6d3SmrgOptional Features 1936c19a6d3Smrg================= 1944028d71eSmrg 1954028d71eSmrg If the package supports it, you can cause programs to be installed 1964028d71eSmrgwith an extra prefix or suffix on their names by giving `configure' the 1974028d71eSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1984028d71eSmrg 1994028d71eSmrg Some packages pay attention to `--enable-FEATURE' options to 2004028d71eSmrg`configure', where FEATURE indicates an optional part of the package. 2014028d71eSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2024028d71eSmrgis something like `gnu-as' or `x' (for the X Window System). The 2034028d71eSmrg`README' should mention any `--enable-' and `--with-' options that the 2044028d71eSmrgpackage recognizes. 2054028d71eSmrg 2064028d71eSmrg For packages that use the X Window System, `configure' can usually 2074028d71eSmrgfind the X include and library files automatically, but if it doesn't, 2084028d71eSmrgyou can use the `configure' options `--x-includes=DIR' and 2094028d71eSmrg`--x-libraries=DIR' to specify their locations. 2104028d71eSmrg 2116c19a6d3Smrg Some packages offer the ability to configure how verbose the 2126c19a6d3Smrgexecution of `make' will be. For these packages, running `./configure 2136c19a6d3Smrg--enable-silent-rules' sets the default to minimal output, which can be 2146c19a6d3Smrgoverridden with `make V=1'; while running `./configure 2156c19a6d3Smrg--disable-silent-rules' sets the default to verbose, which can be 2166c19a6d3Smrgoverridden with `make V=0'. 2176c19a6d3Smrg 2184028d71eSmrgParticular systems 2194028d71eSmrg================== 2204028d71eSmrg 2214028d71eSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2224028d71eSmrgCC is not installed, it is recommended to use the following options in 2234028d71eSmrgorder to use an ANSI C compiler: 2244028d71eSmrg 2256c19a6d3Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2264028d71eSmrg 2274028d71eSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2284028d71eSmrg 2296c19a6d3Smrg HP-UX `make' updates targets which have the same time stamps as 2306c19a6d3Smrgtheir prerequisites, which makes it generally unusable when shipped 2316c19a6d3Smrggenerated files such as `configure' are involved. Use GNU `make' 2326c19a6d3Smrginstead. 2336c19a6d3Smrg 2344028d71eSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2354028d71eSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2364028d71eSmrga workaround. If GNU CC is not installed, it is therefore recommended 2374028d71eSmrgto try 2384028d71eSmrg 2394028d71eSmrg ./configure CC="cc" 2404028d71eSmrg 2414028d71eSmrgand if that doesn't work, try 2424028d71eSmrg 2434028d71eSmrg ./configure CC="cc -nodtk" 2444028d71eSmrg 2456c19a6d3Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 2466c19a6d3Smrgdirectory contains several dysfunctional programs; working variants of 2476c19a6d3Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 2486c19a6d3Smrgin your `PATH', put it _after_ `/usr/bin'. 2496c19a6d3Smrg 2506c19a6d3Smrg On Haiku, software installed for all users goes in `/boot/common', 2516c19a6d3Smrgnot `/usr/local'. It is recommended to use the following options: 2526c19a6d3Smrg 2536c19a6d3Smrg ./configure --prefix=/boot/common 2546c19a6d3Smrg 2554028d71eSmrgSpecifying the System Type 2564028d71eSmrg========================== 2574028d71eSmrg 2584028d71eSmrg There may be some features `configure' cannot figure out 2594028d71eSmrgautomatically, but needs to determine by the type of machine the package 2604028d71eSmrgwill run on. Usually, assuming the package is built to be run on the 2614028d71eSmrg_same_ architectures, `configure' can figure that out, but if it prints 2624028d71eSmrga message saying it cannot guess the machine type, give it the 2634028d71eSmrg`--build=TYPE' option. TYPE can either be a short name for the system 2644028d71eSmrgtype, such as `sun4', or a canonical name which has the form: 2654028d71eSmrg 2664028d71eSmrg CPU-COMPANY-SYSTEM 2674028d71eSmrg 2684028d71eSmrgwhere SYSTEM can have one of these forms: 2694028d71eSmrg 2706c19a6d3Smrg OS 2716c19a6d3Smrg KERNEL-OS 2724028d71eSmrg 2734028d71eSmrg See the file `config.sub' for the possible values of each field. If 2744028d71eSmrg`config.sub' isn't included in this package, then this package doesn't 2754028d71eSmrgneed to know the machine type. 2764028d71eSmrg 2774028d71eSmrg If you are _building_ compiler tools for cross-compiling, you should 2784028d71eSmrguse the option `--target=TYPE' to select the type of system they will 2794028d71eSmrgproduce code for. 2804028d71eSmrg 2814028d71eSmrg If you want to _use_ a cross compiler, that generates code for a 2824028d71eSmrgplatform different from the build platform, you should specify the 2834028d71eSmrg"host" platform (i.e., that on which the generated programs will 2844028d71eSmrgeventually be run) with `--host=TYPE'. 2854028d71eSmrg 2864028d71eSmrgSharing Defaults 2874028d71eSmrg================ 2884028d71eSmrg 2894028d71eSmrg If you want to set default values for `configure' scripts to share, 2904028d71eSmrgyou can create a site shell script called `config.site' that gives 2914028d71eSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 2924028d71eSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2934028d71eSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2944028d71eSmrg`CONFIG_SITE' environment variable to the location of the site script. 2954028d71eSmrgA warning: not all `configure' scripts look for a site script. 2964028d71eSmrg 2974028d71eSmrgDefining Variables 2984028d71eSmrg================== 2994028d71eSmrg 3004028d71eSmrg Variables not defined in a site shell script can be set in the 3014028d71eSmrgenvironment passed to `configure'. However, some packages may run 3024028d71eSmrgconfigure again during the build, and the customized values of these 3034028d71eSmrgvariables may be lost. In order to avoid this problem, you should set 3044028d71eSmrgthem in the `configure' command line, using `VAR=value'. For example: 3054028d71eSmrg 3064028d71eSmrg ./configure CC=/usr/local2/bin/gcc 3074028d71eSmrg 3084028d71eSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 3094028d71eSmrgoverridden in the site shell script). 3104028d71eSmrg 3114028d71eSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3124028d71eSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3134028d71eSmrg 3144028d71eSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3154028d71eSmrg 3164028d71eSmrg`configure' Invocation 3174028d71eSmrg====================== 3184028d71eSmrg 3194028d71eSmrg `configure' recognizes the following options to control how it 3204028d71eSmrgoperates. 3214028d71eSmrg 3224028d71eSmrg`--help' 3234028d71eSmrg`-h' 3244028d71eSmrg Print a summary of all of the options to `configure', and exit. 3254028d71eSmrg 3264028d71eSmrg`--help=short' 3274028d71eSmrg`--help=recursive' 3284028d71eSmrg Print a summary of the options unique to this package's 3294028d71eSmrg `configure', and exit. The `short' variant lists options used 3304028d71eSmrg only in the top level, while the `recursive' variant lists options 3314028d71eSmrg also present in any nested packages. 3324028d71eSmrg 3334028d71eSmrg`--version' 3344028d71eSmrg`-V' 3354028d71eSmrg Print the version of Autoconf used to generate the `configure' 3364028d71eSmrg script, and exit. 3374028d71eSmrg 3384028d71eSmrg`--cache-file=FILE' 3394028d71eSmrg Enable the cache: use and save the results of the tests in FILE, 3404028d71eSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3414028d71eSmrg disable caching. 3424028d71eSmrg 3434028d71eSmrg`--config-cache' 3444028d71eSmrg`-C' 3454028d71eSmrg Alias for `--cache-file=config.cache'. 3464028d71eSmrg 3474028d71eSmrg`--quiet' 3484028d71eSmrg`--silent' 3494028d71eSmrg`-q' 3504028d71eSmrg Do not print messages saying which checks are being made. To 3514028d71eSmrg suppress all normal output, redirect it to `/dev/null' (any error 3524028d71eSmrg messages will still be shown). 3534028d71eSmrg 3544028d71eSmrg`--srcdir=DIR' 3554028d71eSmrg Look for the package's source code in directory DIR. Usually 3564028d71eSmrg `configure' can determine that directory automatically. 3574028d71eSmrg 3584028d71eSmrg`--prefix=DIR' 3596c19a6d3Smrg Use DIR as the installation prefix. *note Installation Names:: 3604028d71eSmrg for more details, including other options available for fine-tuning 3614028d71eSmrg the installation locations. 3624028d71eSmrg 3634028d71eSmrg`--no-create' 3644028d71eSmrg`-n' 3654028d71eSmrg Run the configure checks, but stop before creating any output 3664028d71eSmrg files. 3674028d71eSmrg 3684028d71eSmrg`configure' also accepts some other, not widely useful, options. Run 3694028d71eSmrg`configure --help' for more details. 3704028d71eSmrg 371