183e5f723SmrgInstallation Instructions 283e5f723Smrg************************* 383e5f723Smrg 4c82dfdfbSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5c82dfdfbSmrgInc. 683e5f723Smrg 7c82dfdfbSmrg Copying and distribution of this file, with or without modification, 8c82dfdfbSmrgare permitted in any medium without royalty provided the copyright 9c82dfdfbSmrgnotice and this notice are preserved. This file is offered as-is, 10c82dfdfbSmrgwithout warranty of any kind. 1183e5f723Smrg 1283e5f723SmrgBasic Installation 1383e5f723Smrg================== 1483e5f723Smrg 1583e5f723Smrg Briefly, the shell commands `./configure; make; make install' should 1683e5f723Smrgconfigure, build, and install this package. The following 1783e5f723Smrgmore-detailed instructions are generic; see the `README' file for 18c82dfdfbSmrginstructions specific to this package. Some packages provide this 19c82dfdfbSmrg`INSTALL' file but do not implement all of the features documented 20c82dfdfbSmrgbelow. The lack of an optional feature in a given package is not 21c82dfdfbSmrgnecessarily a bug. More recommendations for GNU packages can be found 22c82dfdfbSmrgin *note Makefile Conventions: (standards)Makefile Conventions. 2383e5f723Smrg 2483e5f723Smrg The `configure' shell script attempts to guess correct values for 2583e5f723Smrgvarious system-dependent variables used during compilation. It uses 2683e5f723Smrgthose values to create a `Makefile' in each directory of the package. 2783e5f723SmrgIt may also create one or more `.h' files containing system-dependent 2883e5f723Smrgdefinitions. Finally, it creates a shell script `config.status' that 2983e5f723Smrgyou can run in the future to recreate the current configuration, and a 3083e5f723Smrgfile `config.log' containing compiler output (useful mainly for 3183e5f723Smrgdebugging `configure'). 3283e5f723Smrg 3383e5f723Smrg It can also use an optional file (typically called `config.cache' 3483e5f723Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 3583e5f723Smrgthe results of its tests to speed up reconfiguring. Caching is 3683e5f723Smrgdisabled by default to prevent problems with accidental use of stale 3783e5f723Smrgcache files. 3883e5f723Smrg 3983e5f723Smrg If you need to do unusual things to compile the package, please try 4083e5f723Smrgto figure out how `configure' could check whether to do them, and mail 4183e5f723Smrgdiffs or instructions to the address given in the `README' so they can 4283e5f723Smrgbe considered for the next release. If you are using the cache, and at 4383e5f723Smrgsome point `config.cache' contains results you don't want to keep, you 4483e5f723Smrgmay remove or edit it. 4583e5f723Smrg 4683e5f723Smrg The file `configure.ac' (or `configure.in') is used to create 4783e5f723Smrg`configure' by a program called `autoconf'. You need `configure.ac' if 4883e5f723Smrgyou want to change it or regenerate `configure' using a newer version 4983e5f723Smrgof `autoconf'. 5083e5f723Smrg 51c82dfdfbSmrg The simplest way to compile this package is: 5283e5f723Smrg 5383e5f723Smrg 1. `cd' to the directory containing the package's source code and type 5483e5f723Smrg `./configure' to configure the package for your system. 5583e5f723Smrg 5683e5f723Smrg Running `configure' might take a while. While running, it prints 5783e5f723Smrg some messages telling which features it is checking for. 5883e5f723Smrg 5983e5f723Smrg 2. Type `make' to compile the package. 6083e5f723Smrg 6183e5f723Smrg 3. Optionally, type `make check' to run any self-tests that come with 62c82dfdfbSmrg the package, generally using the just-built uninstalled binaries. 6383e5f723Smrg 6483e5f723Smrg 4. Type `make install' to install the programs and any data files and 65c82dfdfbSmrg documentation. When installing into a prefix owned by root, it is 66c82dfdfbSmrg recommended that the package be configured and built as a regular 67c82dfdfbSmrg user, and only the `make install' phase executed with root 68c82dfdfbSmrg privileges. 69c82dfdfbSmrg 70c82dfdfbSmrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71c82dfdfbSmrg this time using the binaries in their final installed location. 72c82dfdfbSmrg This target does not install anything. Running this target as a 73c82dfdfbSmrg regular user, particularly if the prior `make install' required 74c82dfdfbSmrg root privileges, verifies that the installation completed 75c82dfdfbSmrg correctly. 76c82dfdfbSmrg 77c82dfdfbSmrg 6. You can remove the program binaries and object files from the 7883e5f723Smrg source code directory by typing `make clean'. To also remove the 7983e5f723Smrg files that `configure' created (so you can compile the package for 8083e5f723Smrg a different kind of computer), type `make distclean'. There is 8183e5f723Smrg also a `make maintainer-clean' target, but that is intended mainly 8283e5f723Smrg for the package's developers. If you use it, you may have to get 8383e5f723Smrg all sorts of other programs in order to regenerate files that came 8483e5f723Smrg with the distribution. 8583e5f723Smrg 86c82dfdfbSmrg 7. Often, you can also type `make uninstall' to remove the installed 87c82dfdfbSmrg files again. In practice, not all packages have tested that 88c82dfdfbSmrg uninstallation works correctly, even though it is required by the 89c82dfdfbSmrg GNU Coding Standards. 90c82dfdfbSmrg 91c82dfdfbSmrg 8. Some packages, particularly those that use Automake, provide `make 92c82dfdfbSmrg distcheck', which can by used by developers to test that all other 93c82dfdfbSmrg targets like `make install' and `make uninstall' work correctly. 94c82dfdfbSmrg This target is generally not run by end users. 9583e5f723Smrg 9683e5f723SmrgCompilers and Options 9783e5f723Smrg===================== 9883e5f723Smrg 9983e5f723Smrg Some systems require unusual options for compilation or linking that 10083e5f723Smrgthe `configure' script does not know about. Run `./configure --help' 10183e5f723Smrgfor details on some of the pertinent environment variables. 10283e5f723Smrg 10383e5f723Smrg You can give `configure' initial values for configuration parameters 10483e5f723Smrgby setting variables in the command line or in the environment. Here 10583e5f723Smrgis an example: 10683e5f723Smrg 10783e5f723Smrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 10883e5f723Smrg 10983e5f723Smrg *Note Defining Variables::, for more details. 11083e5f723Smrg 11183e5f723SmrgCompiling For Multiple Architectures 11283e5f723Smrg==================================== 11383e5f723Smrg 11483e5f723Smrg You can compile the package for more than one kind of computer at the 11583e5f723Smrgsame time, by placing the object files for each architecture in their 11683e5f723Smrgown directory. To do this, you can use GNU `make'. `cd' to the 11783e5f723Smrgdirectory where you want the object files and executables to go and run 11883e5f723Smrgthe `configure' script. `configure' automatically checks for the 119c82dfdfbSmrgsource code in the directory that `configure' is in and in `..'. This 120c82dfdfbSmrgis known as a "VPATH" build. 12183e5f723Smrg 12283e5f723Smrg With a non-GNU `make', it is safer to compile the package for one 12383e5f723Smrgarchitecture at a time in the source code directory. After you have 12483e5f723Smrginstalled the package for one architecture, use `make distclean' before 12583e5f723Smrgreconfiguring for another architecture. 12683e5f723Smrg 12783e5f723Smrg On MacOS X 10.5 and later systems, you can create libraries and 12883e5f723Smrgexecutables that work on multiple system types--known as "fat" or 12983e5f723Smrg"universal" binaries--by specifying multiple `-arch' options to the 13083e5f723Smrgcompiler but only a single `-arch' option to the preprocessor. Like 13183e5f723Smrgthis: 13283e5f723Smrg 13383e5f723Smrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13483e5f723Smrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 13583e5f723Smrg CPP="gcc -E" CXXCPP="g++ -E" 13683e5f723Smrg 13783e5f723Smrg This is not guaranteed to produce working output in all cases, you 13883e5f723Smrgmay have to build one architecture at a time and combine the results 13983e5f723Smrgusing the `lipo' tool if you have problems. 14083e5f723Smrg 14183e5f723SmrgInstallation Names 14283e5f723Smrg================== 14383e5f723Smrg 14483e5f723Smrg By default, `make install' installs the package's commands under 14583e5f723Smrg`/usr/local/bin', include files under `/usr/local/include', etc. You 14683e5f723Smrgcan specify an installation prefix other than `/usr/local' by giving 147c82dfdfbSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148c82dfdfbSmrgabsolute file name. 14983e5f723Smrg 15083e5f723Smrg You can specify separate installation prefixes for 15183e5f723Smrgarchitecture-specific files and architecture-independent files. If you 15283e5f723Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 15383e5f723SmrgPREFIX as the prefix for installing programs and libraries. 15483e5f723SmrgDocumentation and other data files still use the regular prefix. 15583e5f723Smrg 15683e5f723Smrg In addition, if you use an unusual directory layout you can give 15783e5f723Smrgoptions like `--bindir=DIR' to specify different values for particular 15883e5f723Smrgkinds of files. Run `configure --help' for a list of the directories 159c82dfdfbSmrgyou can set and what kinds of files go in them. In general, the 160c82dfdfbSmrgdefault for these options is expressed in terms of `${prefix}', so that 161c82dfdfbSmrgspecifying just `--prefix' will affect all of the other directory 162c82dfdfbSmrgspecifications that were not explicitly provided. 163c82dfdfbSmrg 164c82dfdfbSmrg The most portable way to affect installation locations is to pass the 165c82dfdfbSmrgcorrect locations to `configure'; however, many packages provide one or 166c82dfdfbSmrgboth of the following shortcuts of passing variable assignments to the 167c82dfdfbSmrg`make install' command line to change installation locations without 168c82dfdfbSmrghaving to reconfigure or recompile. 169c82dfdfbSmrg 170c82dfdfbSmrg The first method involves providing an override variable for each 171c82dfdfbSmrgaffected directory. For example, `make install 172c82dfdfbSmrgprefix=/alternate/directory' will choose an alternate location for all 173c82dfdfbSmrgdirectory configuration variables that were expressed in terms of 174c82dfdfbSmrg`${prefix}'. Any directories that were specified during `configure', 175c82dfdfbSmrgbut not in terms of `${prefix}', must each be overridden at install 176c82dfdfbSmrgtime for the entire installation to be relocated. The approach of 177c82dfdfbSmrgmakefile variable overrides for each directory variable is required by 178c82dfdfbSmrgthe GNU Coding Standards, and ideally causes no recompilation. 179c82dfdfbSmrgHowever, some platforms have known limitations with the semantics of 180c82dfdfbSmrgshared libraries that end up requiring recompilation when using this 181c82dfdfbSmrgmethod, particularly noticeable in packages that use GNU Libtool. 182c82dfdfbSmrg 183c82dfdfbSmrg The second method involves providing the `DESTDIR' variable. For 184c82dfdfbSmrgexample, `make install DESTDIR=/alternate/directory' will prepend 185c82dfdfbSmrg`/alternate/directory' before all installation names. The approach of 186c82dfdfbSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187c82dfdfbSmrgdoes not work on platforms that have drive letters. On the other hand, 188c82dfdfbSmrgit does better at avoiding recompilation issues, and works well even 189c82dfdfbSmrgwhen some directory options were not specified in terms of `${prefix}' 190c82dfdfbSmrgat `configure' time. 191c82dfdfbSmrg 192c82dfdfbSmrgOptional Features 193c82dfdfbSmrg================= 19483e5f723Smrg 19583e5f723Smrg If the package supports it, you can cause programs to be installed 19683e5f723Smrgwith an extra prefix or suffix on their names by giving `configure' the 19783e5f723Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 19883e5f723Smrg 19983e5f723Smrg Some packages pay attention to `--enable-FEATURE' options to 20083e5f723Smrg`configure', where FEATURE indicates an optional part of the package. 20183e5f723SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 20283e5f723Smrgis something like `gnu-as' or `x' (for the X Window System). The 20383e5f723Smrg`README' should mention any `--enable-' and `--with-' options that the 20483e5f723Smrgpackage recognizes. 20583e5f723Smrg 20683e5f723Smrg For packages that use the X Window System, `configure' can usually 20783e5f723Smrgfind the X include and library files automatically, but if it doesn't, 20883e5f723Smrgyou can use the `configure' options `--x-includes=DIR' and 20983e5f723Smrg`--x-libraries=DIR' to specify their locations. 21083e5f723Smrg 211c82dfdfbSmrg Some packages offer the ability to configure how verbose the 212c82dfdfbSmrgexecution of `make' will be. For these packages, running `./configure 213c82dfdfbSmrg--enable-silent-rules' sets the default to minimal output, which can be 214c82dfdfbSmrgoverridden with `make V=1'; while running `./configure 215c82dfdfbSmrg--disable-silent-rules' sets the default to verbose, which can be 216c82dfdfbSmrgoverridden with `make V=0'. 217c82dfdfbSmrg 21883e5f723SmrgParticular systems 21983e5f723Smrg================== 22083e5f723Smrg 22183e5f723Smrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 22283e5f723SmrgCC is not installed, it is recommended to use the following options in 22383e5f723Smrgorder to use an ANSI C compiler: 22483e5f723Smrg 225c82dfdfbSmrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 22683e5f723Smrg 22783e5f723Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 22883e5f723Smrg 229c82dfdfbSmrg HP-UX `make' updates targets which have the same time stamps as 230c82dfdfbSmrgtheir prerequisites, which makes it generally unusable when shipped 231c82dfdfbSmrggenerated files such as `configure' are involved. Use GNU `make' 232c82dfdfbSmrginstead. 233c82dfdfbSmrg 23483e5f723Smrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 23583e5f723Smrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 23683e5f723Smrga workaround. If GNU CC is not installed, it is therefore recommended 23783e5f723Smrgto try 23883e5f723Smrg 23983e5f723Smrg ./configure CC="cc" 24083e5f723Smrg 24183e5f723Smrgand if that doesn't work, try 24283e5f723Smrg 24383e5f723Smrg ./configure CC="cc -nodtk" 24483e5f723Smrg 245c82dfdfbSmrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246c82dfdfbSmrgdirectory contains several dysfunctional programs; working variants of 247c82dfdfbSmrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248c82dfdfbSmrgin your `PATH', put it _after_ `/usr/bin'. 249c82dfdfbSmrg 250c82dfdfbSmrg On Haiku, software installed for all users goes in `/boot/common', 251c82dfdfbSmrgnot `/usr/local'. It is recommended to use the following options: 252c82dfdfbSmrg 253c82dfdfbSmrg ./configure --prefix=/boot/common 254c82dfdfbSmrg 25583e5f723SmrgSpecifying the System Type 25683e5f723Smrg========================== 25783e5f723Smrg 25883e5f723Smrg There may be some features `configure' cannot figure out 25983e5f723Smrgautomatically, but needs to determine by the type of machine the package 26083e5f723Smrgwill run on. Usually, assuming the package is built to be run on the 26183e5f723Smrg_same_ architectures, `configure' can figure that out, but if it prints 26283e5f723Smrga message saying it cannot guess the machine type, give it the 26383e5f723Smrg`--build=TYPE' option. TYPE can either be a short name for the system 26483e5f723Smrgtype, such as `sun4', or a canonical name which has the form: 26583e5f723Smrg 26683e5f723Smrg CPU-COMPANY-SYSTEM 26783e5f723Smrg 26883e5f723Smrgwhere SYSTEM can have one of these forms: 26983e5f723Smrg 270c82dfdfbSmrg OS 271c82dfdfbSmrg KERNEL-OS 27283e5f723Smrg 27383e5f723Smrg See the file `config.sub' for the possible values of each field. If 27483e5f723Smrg`config.sub' isn't included in this package, then this package doesn't 27583e5f723Smrgneed to know the machine type. 27683e5f723Smrg 27783e5f723Smrg If you are _building_ compiler tools for cross-compiling, you should 27883e5f723Smrguse the option `--target=TYPE' to select the type of system they will 27983e5f723Smrgproduce code for. 28083e5f723Smrg 28183e5f723Smrg If you want to _use_ a cross compiler, that generates code for a 28283e5f723Smrgplatform different from the build platform, you should specify the 28383e5f723Smrg"host" platform (i.e., that on which the generated programs will 28483e5f723Smrgeventually be run) with `--host=TYPE'. 28583e5f723Smrg 28683e5f723SmrgSharing Defaults 28783e5f723Smrg================ 28883e5f723Smrg 28983e5f723Smrg If you want to set default values for `configure' scripts to share, 29083e5f723Smrgyou can create a site shell script called `config.site' that gives 29183e5f723Smrgdefault values for variables like `CC', `cache_file', and `prefix'. 29283e5f723Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then 29383e5f723Smrg`PREFIX/etc/config.site' if it exists. Or, you can set the 29483e5f723Smrg`CONFIG_SITE' environment variable to the location of the site script. 29583e5f723SmrgA warning: not all `configure' scripts look for a site script. 29683e5f723Smrg 29783e5f723SmrgDefining Variables 29883e5f723Smrg================== 29983e5f723Smrg 30083e5f723Smrg Variables not defined in a site shell script can be set in the 30183e5f723Smrgenvironment passed to `configure'. However, some packages may run 30283e5f723Smrgconfigure again during the build, and the customized values of these 30383e5f723Smrgvariables may be lost. In order to avoid this problem, you should set 30483e5f723Smrgthem in the `configure' command line, using `VAR=value'. For example: 30583e5f723Smrg 30683e5f723Smrg ./configure CC=/usr/local2/bin/gcc 30783e5f723Smrg 30883e5f723Smrgcauses the specified `gcc' to be used as the C compiler (unless it is 30983e5f723Smrgoverridden in the site shell script). 31083e5f723Smrg 31183e5f723SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 31283e5f723Smrgan Autoconf bug. Until the bug is fixed you can use this workaround: 31383e5f723Smrg 31483e5f723Smrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 31583e5f723Smrg 31683e5f723Smrg`configure' Invocation 31783e5f723Smrg====================== 31883e5f723Smrg 31983e5f723Smrg `configure' recognizes the following options to control how it 32083e5f723Smrgoperates. 32183e5f723Smrg 32283e5f723Smrg`--help' 32383e5f723Smrg`-h' 32483e5f723Smrg Print a summary of all of the options to `configure', and exit. 32583e5f723Smrg 32683e5f723Smrg`--help=short' 32783e5f723Smrg`--help=recursive' 32883e5f723Smrg Print a summary of the options unique to this package's 32983e5f723Smrg `configure', and exit. The `short' variant lists options used 33083e5f723Smrg only in the top level, while the `recursive' variant lists options 33183e5f723Smrg also present in any nested packages. 33283e5f723Smrg 33383e5f723Smrg`--version' 33483e5f723Smrg`-V' 33583e5f723Smrg Print the version of Autoconf used to generate the `configure' 33683e5f723Smrg script, and exit. 33783e5f723Smrg 33883e5f723Smrg`--cache-file=FILE' 33983e5f723Smrg Enable the cache: use and save the results of the tests in FILE, 34083e5f723Smrg traditionally `config.cache'. FILE defaults to `/dev/null' to 34183e5f723Smrg disable caching. 34283e5f723Smrg 34383e5f723Smrg`--config-cache' 34483e5f723Smrg`-C' 34583e5f723Smrg Alias for `--cache-file=config.cache'. 34683e5f723Smrg 34783e5f723Smrg`--quiet' 34883e5f723Smrg`--silent' 34983e5f723Smrg`-q' 35083e5f723Smrg Do not print messages saying which checks are being made. To 35183e5f723Smrg suppress all normal output, redirect it to `/dev/null' (any error 35283e5f723Smrg messages will still be shown). 35383e5f723Smrg 35483e5f723Smrg`--srcdir=DIR' 35583e5f723Smrg Look for the package's source code in directory DIR. Usually 35683e5f723Smrg `configure' can determine that directory automatically. 35783e5f723Smrg 35883e5f723Smrg`--prefix=DIR' 359c82dfdfbSmrg Use DIR as the installation prefix. *note Installation Names:: 36083e5f723Smrg for more details, including other options available for fine-tuning 36183e5f723Smrg the installation locations. 36283e5f723Smrg 36383e5f723Smrg`--no-create' 36483e5f723Smrg`-n' 36583e5f723Smrg Run the configure checks, but stop before creating any output 36683e5f723Smrg files. 36783e5f723Smrg 36883e5f723Smrg`configure' also accepts some other, not widely useful, options. Run 36983e5f723Smrg`configure --help' for more details. 37083e5f723Smrg 371