12a75d1c4SmrgInstallation Instructions 22a75d1c4Smrg************************* 32a75d1c4Smrg 466ab3337SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 566ab3337SmrgInc. 62a75d1c4Smrg 766ab3337Smrg Copying and distribution of this file, with or without modification, 866ab3337Smrgare permitted in any medium without royalty provided the copyright 966ab3337Smrgnotice and this notice are preserved. This file is offered as-is, 1066ab3337Smrgwithout warranty of any kind. 112a75d1c4Smrg 122a75d1c4SmrgBasic Installation 132a75d1c4Smrg================== 142a75d1c4Smrg 152a75d1c4Smrg Briefly, the shell commands `./configure; make; make install' should 162a75d1c4Smrgconfigure, build, and install this package. The following 172a75d1c4Smrgmore-detailed instructions are generic; see the `README' file for 1866ab3337Smrginstructions specific to this package. Some packages provide this 1966ab3337Smrg`INSTALL' file but do not implement all of the features documented 2066ab3337Smrgbelow. The lack of an optional feature in a given package is not 2166ab3337Smrgnecessarily a bug. More recommendations for GNU packages can be found 2266ab3337Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 232a75d1c4Smrg 242a75d1c4Smrg The `configure' shell script attempts to guess correct values for 252a75d1c4Smrgvarious system-dependent variables used during compilation. It uses 262a75d1c4Smrgthose values to create a `Makefile' in each directory of the package. 272a75d1c4SmrgIt may also create one or more `.h' files containing system-dependent 282a75d1c4Smrgdefinitions. Finally, it creates a shell script `config.status' that 292a75d1c4Smrgyou can run in the future to recreate the current configuration, and a 302a75d1c4Smrgfile `config.log' containing compiler output (useful mainly for 312a75d1c4Smrgdebugging `configure'). 322a75d1c4Smrg 332a75d1c4Smrg It can also use an optional file (typically called `config.cache' 342a75d1c4Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 352a75d1c4Smrgthe results of its tests to speed up reconfiguring. Caching is 362a75d1c4Smrgdisabled by default to prevent problems with accidental use of stale 372a75d1c4Smrgcache files. 382a75d1c4Smrg 392a75d1c4Smrg If you need to do unusual things to compile the package, please try 402a75d1c4Smrgto figure out how `configure' could check whether to do them, and mail 412a75d1c4Smrgdiffs or instructions to the address given in the `README' so they can 422a75d1c4Smrgbe considered for the next release. If you are using the cache, and at 432a75d1c4Smrgsome point `config.cache' contains results you don't want to keep, you 442a75d1c4Smrgmay remove or edit it. 452a75d1c4Smrg 462a75d1c4Smrg The file `configure.ac' (or `configure.in') is used to create 472a75d1c4Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 482a75d1c4Smrgyou want to change it or regenerate `configure' using a newer version 492a75d1c4Smrgof `autoconf'. 502a75d1c4Smrg 5166ab3337Smrg The simplest way to compile this package is: 522a75d1c4Smrg 532a75d1c4Smrg 1. `cd' to the directory containing the package's source code and type 542a75d1c4Smrg `./configure' to configure the package for your system. 552a75d1c4Smrg 562a75d1c4Smrg Running `configure' might take a while. While running, it prints 572a75d1c4Smrg some messages telling which features it is checking for. 582a75d1c4Smrg 592a75d1c4Smrg 2. Type `make' to compile the package. 602a75d1c4Smrg 612a75d1c4Smrg 3. Optionally, type `make check' to run any self-tests that come with 6266ab3337Smrg the package, generally using the just-built uninstalled binaries. 632a75d1c4Smrg 642a75d1c4Smrg 4. Type `make install' to install the programs and any data files and 6566ab3337Smrg documentation. When installing into a prefix owned by root, it is 6666ab3337Smrg recommended that the package be configured and built as a regular 6766ab3337Smrg user, and only the `make install' phase executed with root 6866ab3337Smrg privileges. 6966ab3337Smrg 7066ab3337Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 7166ab3337Smrg this time using the binaries in their final installed location. 7266ab3337Smrg This target does not install anything. Running this target as a 7366ab3337Smrg regular user, particularly if the prior `make install' required 7466ab3337Smrg root privileges, verifies that the installation completed 7566ab3337Smrg correctly. 7666ab3337Smrg 7766ab3337Smrg 6. You can remove the program binaries and object files from the 782a75d1c4Smrg source code directory by typing `make clean'. To also remove the 792a75d1c4Smrg files that `configure' created (so you can compile the package for 802a75d1c4Smrg a different kind of computer), type `make distclean'. There is 812a75d1c4Smrg also a `make maintainer-clean' target, but that is intended mainly 822a75d1c4Smrg for the package's developers. If you use it, you may have to get 832a75d1c4Smrg all sorts of other programs in order to regenerate files that came 842a75d1c4Smrg with the distribution. 852a75d1c4Smrg 8666ab3337Smrg 7. Often, you can also type `make uninstall' to remove the installed 8766ab3337Smrg files again. In practice, not all packages have tested that 8866ab3337Smrg uninstallation works correctly, even though it is required by the 8966ab3337Smrg GNU Coding Standards. 9066ab3337Smrg 9166ab3337Smrg 8. Some packages, particularly those that use Automake, provide `make 9266ab3337Smrg distcheck', which can by used by developers to test that all other 9366ab3337Smrg targets like `make install' and `make uninstall' work correctly. 9466ab3337Smrg This target is generally not run by end users. 952a75d1c4Smrg 962a75d1c4SmrgCompilers and Options 972a75d1c4Smrg===================== 982a75d1c4Smrg 992a75d1c4Smrg Some systems require unusual options for compilation or linking that 1002a75d1c4Smrgthe `configure' script does not know about. Run `./configure --help' 1012a75d1c4Smrgfor details on some of the pertinent environment variables. 1022a75d1c4Smrg 1032a75d1c4Smrg You can give `configure' initial values for configuration parameters 1042a75d1c4Smrgby setting variables in the command line or in the environment. Here 1052a75d1c4Smrgis an example: 1062a75d1c4Smrg 1072a75d1c4Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1082a75d1c4Smrg 1092a75d1c4Smrg *Note Defining Variables::, for more details. 1102a75d1c4Smrg 1112a75d1c4SmrgCompiling For Multiple Architectures 1122a75d1c4Smrg==================================== 1132a75d1c4Smrg 1142a75d1c4Smrg You can compile the package for more than one kind of computer at the 1152a75d1c4Smrgsame time, by placing the object files for each architecture in their 1162a75d1c4Smrgown directory. To do this, you can use GNU `make'. `cd' to the 1172a75d1c4Smrgdirectory where you want the object files and executables to go and run 1182a75d1c4Smrgthe `configure' script. `configure' automatically checks for the 11966ab3337Smrgsource code in the directory that `configure' is in and in `..'. This 12066ab3337Smrgis known as a "VPATH" build. 1212a75d1c4Smrg 1222a75d1c4Smrg With a non-GNU `make', it is safer to compile the package for one 1232a75d1c4Smrgarchitecture at a time in the source code directory. After you have 1242a75d1c4Smrginstalled the package for one architecture, use `make distclean' before 1252a75d1c4Smrgreconfiguring for another architecture. 1262a75d1c4Smrg 1272a75d1c4Smrg On MacOS X 10.5 and later systems, you can create libraries and 1282a75d1c4Smrgexecutables that work on multiple system types--known as "fat" or 1292a75d1c4Smrg"universal" binaries--by specifying multiple `-arch' options to the 1302a75d1c4Smrgcompiler but only a single `-arch' option to the preprocessor. Like 1312a75d1c4Smrgthis: 1322a75d1c4Smrg 1332a75d1c4Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1342a75d1c4Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1352a75d1c4Smrg CPP="gcc -E" CXXCPP="g++ -E" 1362a75d1c4Smrg 1372a75d1c4Smrg This is not guaranteed to produce working output in all cases, you 1382a75d1c4Smrgmay have to build one architecture at a time and combine the results 1392a75d1c4Smrgusing the `lipo' tool if you have problems. 1402a75d1c4Smrg 1412a75d1c4SmrgInstallation Names 1422a75d1c4Smrg================== 1432a75d1c4Smrg 1442a75d1c4Smrg By default, `make install' installs the package's commands under 1452a75d1c4Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1462a75d1c4Smrgcan specify an installation prefix other than `/usr/local' by giving 14766ab3337Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 14866ab3337Smrgabsolute file name. 1492a75d1c4Smrg 1502a75d1c4Smrg You can specify separate installation prefixes for 1512a75d1c4Smrgarchitecture-specific files and architecture-independent files. If you 1522a75d1c4Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1532a75d1c4SmrgPREFIX as the prefix for installing programs and libraries. 1542a75d1c4SmrgDocumentation and other data files still use the regular prefix. 1552a75d1c4Smrg 1562a75d1c4Smrg In addition, if you use an unusual directory layout you can give 1572a75d1c4Smrgoptions like `--bindir=DIR' to specify different values for particular 1582a75d1c4Smrgkinds of files. Run `configure --help' for a list of the directories 15966ab3337Smrgyou can set and what kinds of files go in them. In general, the 16066ab3337Smrgdefault for these options is expressed in terms of `${prefix}', so that 16166ab3337Smrgspecifying just `--prefix' will affect all of the other directory 16266ab3337Smrgspecifications that were not explicitly provided. 16366ab3337Smrg 16466ab3337Smrg The most portable way to affect installation locations is to pass the 16566ab3337Smrgcorrect locations to `configure'; however, many packages provide one or 16666ab3337Smrgboth of the following shortcuts of passing variable assignments to the 16766ab3337Smrg`make install' command line to change installation locations without 16866ab3337Smrghaving to reconfigure or recompile. 16966ab3337Smrg 17066ab3337Smrg The first method involves providing an override variable for each 17166ab3337Smrgaffected directory. For example, `make install 17266ab3337Smrgprefix=/alternate/directory' will choose an alternate location for all 17366ab3337Smrgdirectory configuration variables that were expressed in terms of 17466ab3337Smrg`${prefix}'. Any directories that were specified during `configure', 17566ab3337Smrgbut not in terms of `${prefix}', must each be overridden at install 17666ab3337Smrgtime for the entire installation to be relocated. The approach of 17766ab3337Smrgmakefile variable overrides for each directory variable is required by 17866ab3337Smrgthe GNU Coding Standards, and ideally causes no recompilation. 17966ab3337SmrgHowever, some platforms have known limitations with the semantics of 18066ab3337Smrgshared libraries that end up requiring recompilation when using this 18166ab3337Smrgmethod, particularly noticeable in packages that use GNU Libtool. 18266ab3337Smrg 18366ab3337Smrg The second method involves providing the `DESTDIR' variable. For 18466ab3337Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 18566ab3337Smrg`/alternate/directory' before all installation names. The approach of 18666ab3337Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 18766ab3337Smrgdoes not work on platforms that have drive letters. On the other hand, 18866ab3337Smrgit does better at avoiding recompilation issues, and works well even 18966ab3337Smrgwhen some directory options were not specified in terms of `${prefix}' 19066ab3337Smrgat `configure' time. 19166ab3337Smrg 19266ab3337SmrgOptional Features 19366ab3337Smrg================= 1942a75d1c4Smrg 1952a75d1c4Smrg If the package supports it, you can cause programs to be installed 1962a75d1c4Smrgwith an extra prefix or suffix on their names by giving `configure' the 1972a75d1c4Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1982a75d1c4Smrg 1992a75d1c4Smrg Some packages pay attention to `--enable-FEATURE' options to 2002a75d1c4Smrg`configure', where FEATURE indicates an optional part of the package. 2012a75d1c4SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2022a75d1c4Smrgis something like `gnu-as' or `x' (for the X Window System). The 2032a75d1c4Smrg`README' should mention any `--enable-' and `--with-' options that the 2042a75d1c4Smrgpackage recognizes. 2052a75d1c4Smrg 2062a75d1c4Smrg For packages that use the X Window System, `configure' can usually 2072a75d1c4Smrgfind the X include and library files automatically, but if it doesn't, 2082a75d1c4Smrgyou can use the `configure' options `--x-includes=DIR' and 2092a75d1c4Smrg`--x-libraries=DIR' to specify their locations. 2102a75d1c4Smrg 21166ab3337Smrg Some packages offer the ability to configure how verbose the 21266ab3337Smrgexecution of `make' will be. For these packages, running `./configure 21366ab3337Smrg--enable-silent-rules' sets the default to minimal output, which can be 21466ab3337Smrgoverridden with `make V=1'; while running `./configure 21566ab3337Smrg--disable-silent-rules' sets the default to verbose, which can be 21666ab3337Smrgoverridden with `make V=0'. 21766ab3337Smrg 2182a75d1c4SmrgParticular systems 2192a75d1c4Smrg================== 2202a75d1c4Smrg 2212a75d1c4Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2222a75d1c4SmrgCC is not installed, it is recommended to use the following options in 2232a75d1c4Smrgorder to use an ANSI C compiler: 2242a75d1c4Smrg 22566ab3337Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2262a75d1c4Smrg 2272a75d1c4Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2282a75d1c4Smrg 22966ab3337Smrg HP-UX `make' updates targets which have the same time stamps as 23066ab3337Smrgtheir prerequisites, which makes it generally unusable when shipped 23166ab3337Smrggenerated files such as `configure' are involved. Use GNU `make' 23266ab3337Smrginstead. 23366ab3337Smrg 2342a75d1c4Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2352a75d1c4Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2362a75d1c4Smrga workaround. If GNU CC is not installed, it is therefore recommended 2372a75d1c4Smrgto try 2382a75d1c4Smrg 2392a75d1c4Smrg ./configure CC="cc" 2402a75d1c4Smrg 2412a75d1c4Smrgand if that doesn't work, try 2422a75d1c4Smrg 2432a75d1c4Smrg ./configure CC="cc -nodtk" 2442a75d1c4Smrg 24566ab3337Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 24666ab3337Smrgdirectory contains several dysfunctional programs; working variants of 24766ab3337Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 24866ab3337Smrgin your `PATH', put it _after_ `/usr/bin'. 24966ab3337Smrg 25066ab3337Smrg On Haiku, software installed for all users goes in `/boot/common', 25166ab3337Smrgnot `/usr/local'. It is recommended to use the following options: 25266ab3337Smrg 25366ab3337Smrg ./configure --prefix=/boot/common 25466ab3337Smrg 2552a75d1c4SmrgSpecifying the System Type 2562a75d1c4Smrg========================== 2572a75d1c4Smrg 2582a75d1c4Smrg There may be some features `configure' cannot figure out 2592a75d1c4Smrgautomatically, but needs to determine by the type of machine the package 2602a75d1c4Smrgwill run on. Usually, assuming the package is built to be run on the 2612a75d1c4Smrg_same_ architectures, `configure' can figure that out, but if it prints 2622a75d1c4Smrga message saying it cannot guess the machine type, give it the 2632a75d1c4Smrg`--build=TYPE' option. TYPE can either be a short name for the system 2642a75d1c4Smrgtype, such as `sun4', or a canonical name which has the form: 2652a75d1c4Smrg 2662a75d1c4Smrg CPU-COMPANY-SYSTEM 2672a75d1c4Smrg 2682a75d1c4Smrgwhere SYSTEM can have one of these forms: 2692a75d1c4Smrg 27066ab3337Smrg OS 27166ab3337Smrg KERNEL-OS 2722a75d1c4Smrg 2732a75d1c4Smrg See the file `config.sub' for the possible values of each field. If 2742a75d1c4Smrg`config.sub' isn't included in this package, then this package doesn't 2752a75d1c4Smrgneed to know the machine type. 2762a75d1c4Smrg 2772a75d1c4Smrg If you are _building_ compiler tools for cross-compiling, you should 2782a75d1c4Smrguse the option `--target=TYPE' to select the type of system they will 2792a75d1c4Smrgproduce code for. 2802a75d1c4Smrg 2812a75d1c4Smrg If you want to _use_ a cross compiler, that generates code for a 2822a75d1c4Smrgplatform different from the build platform, you should specify the 2832a75d1c4Smrg"host" platform (i.e., that on which the generated programs will 2842a75d1c4Smrgeventually be run) with `--host=TYPE'. 2852a75d1c4Smrg 2862a75d1c4SmrgSharing Defaults 2872a75d1c4Smrg================ 2882a75d1c4Smrg 2892a75d1c4Smrg If you want to set default values for `configure' scripts to share, 2902a75d1c4Smrgyou can create a site shell script called `config.site' that gives 2912a75d1c4Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 2922a75d1c4Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2932a75d1c4Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2942a75d1c4Smrg`CONFIG_SITE' environment variable to the location of the site script. 2952a75d1c4SmrgA warning: not all `configure' scripts look for a site script. 2962a75d1c4Smrg 2972a75d1c4SmrgDefining Variables 2982a75d1c4Smrg================== 2992a75d1c4Smrg 3002a75d1c4Smrg Variables not defined in a site shell script can be set in the 3012a75d1c4Smrgenvironment passed to `configure'. However, some packages may run 3022a75d1c4Smrgconfigure again during the build, and the customized values of these 3032a75d1c4Smrgvariables may be lost. In order to avoid this problem, you should set 3042a75d1c4Smrgthem in the `configure' command line, using `VAR=value'. For example: 3052a75d1c4Smrg 3062a75d1c4Smrg ./configure CC=/usr/local2/bin/gcc 3072a75d1c4Smrg 3082a75d1c4Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 3092a75d1c4Smrgoverridden in the site shell script). 3102a75d1c4Smrg 3112a75d1c4SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3122a75d1c4Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3132a75d1c4Smrg 3142a75d1c4Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3152a75d1c4Smrg 3162a75d1c4Smrg`configure' Invocation 3172a75d1c4Smrg====================== 3182a75d1c4Smrg 3192a75d1c4Smrg `configure' recognizes the following options to control how it 3202a75d1c4Smrgoperates. 3212a75d1c4Smrg 3222a75d1c4Smrg`--help' 3232a75d1c4Smrg`-h' 3242a75d1c4Smrg Print a summary of all of the options to `configure', and exit. 3252a75d1c4Smrg 3262a75d1c4Smrg`--help=short' 3272a75d1c4Smrg`--help=recursive' 3282a75d1c4Smrg Print a summary of the options unique to this package's 3292a75d1c4Smrg `configure', and exit. The `short' variant lists options used 3302a75d1c4Smrg only in the top level, while the `recursive' variant lists options 3312a75d1c4Smrg also present in any nested packages. 3322a75d1c4Smrg 3332a75d1c4Smrg`--version' 3342a75d1c4Smrg`-V' 3352a75d1c4Smrg Print the version of Autoconf used to generate the `configure' 3362a75d1c4Smrg script, and exit. 3372a75d1c4Smrg 3382a75d1c4Smrg`--cache-file=FILE' 3392a75d1c4Smrg Enable the cache: use and save the results of the tests in FILE, 3402a75d1c4Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3412a75d1c4Smrg disable caching. 3422a75d1c4Smrg 3432a75d1c4Smrg`--config-cache' 3442a75d1c4Smrg`-C' 3452a75d1c4Smrg Alias for `--cache-file=config.cache'. 3462a75d1c4Smrg 3472a75d1c4Smrg`--quiet' 3482a75d1c4Smrg`--silent' 3492a75d1c4Smrg`-q' 3502a75d1c4Smrg Do not print messages saying which checks are being made. To 3512a75d1c4Smrg suppress all normal output, redirect it to `/dev/null' (any error 3522a75d1c4Smrg messages will still be shown). 3532a75d1c4Smrg 3542a75d1c4Smrg`--srcdir=DIR' 3552a75d1c4Smrg Look for the package's source code in directory DIR. Usually 3562a75d1c4Smrg `configure' can determine that directory automatically. 3572a75d1c4Smrg 3582a75d1c4Smrg`--prefix=DIR' 35966ab3337Smrg Use DIR as the installation prefix. *note Installation Names:: 3602a75d1c4Smrg for more details, including other options available for fine-tuning 3612a75d1c4Smrg the installation locations. 3622a75d1c4Smrg 3632a75d1c4Smrg`--no-create' 3642a75d1c4Smrg`-n' 3652a75d1c4Smrg Run the configure checks, but stop before creating any output 3662a75d1c4Smrg files. 3672a75d1c4Smrg 3682a75d1c4Smrg`configure' also accepts some other, not widely useful, options. Run 3692a75d1c4Smrg`configure --help' for more details. 3702a75d1c4Smrg 371