17bd0f98dSmrgInstallation Instructions 27bd0f98dSmrg************************* 37bd0f98dSmrg 4e7c933f3SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, 5e7c933f3SmrgInc. 67bd0f98dSmrg 7e7c933f3Smrg Copying and distribution of this file, with or without modification, 8e7c933f3Smrgare permitted in any medium without royalty provided the copyright 9e7c933f3Smrgnotice and this notice are preserved. This file is offered as-is, 10e7c933f3Smrgwithout warranty of any kind. 117bd0f98dSmrg 127bd0f98dSmrgBasic Installation 137bd0f98dSmrg================== 147bd0f98dSmrg 157bd0f98dSmrg Briefly, the shell commands `./configure; make; make install' should 167bd0f98dSmrgconfigure, build, and install this package. The following 177bd0f98dSmrgmore-detailed instructions are generic; see the `README' file for 18e7c933f3Smrginstructions specific to this package. Some packages provide this 19e7c933f3Smrg`INSTALL' file but do not implement all of the features documented 20e7c933f3Smrgbelow. The lack of an optional feature in a given package is not 21e7c933f3Smrgnecessarily a bug. More recommendations for GNU packages can be found 22e7c933f3Smrgin *note Makefile Conventions: (standards)Makefile Conventions. 237bd0f98dSmrg 247bd0f98dSmrg The `configure' shell script attempts to guess correct values for 257bd0f98dSmrgvarious system-dependent variables used during compilation. It uses 267bd0f98dSmrgthose values to create a `Makefile' in each directory of the package. 277bd0f98dSmrgIt may also create one or more `.h' files containing system-dependent 287bd0f98dSmrgdefinitions. Finally, it creates a shell script `config.status' that 297bd0f98dSmrgyou can run in the future to recreate the current configuration, and a 307bd0f98dSmrgfile `config.log' containing compiler output (useful mainly for 317bd0f98dSmrgdebugging `configure'). 327bd0f98dSmrg 337bd0f98dSmrg It can also use an optional file (typically called `config.cache' 347bd0f98dSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves 357bd0f98dSmrgthe results of its tests to speed up reconfiguring. Caching is 367bd0f98dSmrgdisabled by default to prevent problems with accidental use of stale 377bd0f98dSmrgcache files. 387bd0f98dSmrg 397bd0f98dSmrg If you need to do unusual things to compile the package, please try 407bd0f98dSmrgto figure out how `configure' could check whether to do them, and mail 417bd0f98dSmrgdiffs or instructions to the address given in the `README' so they can 427bd0f98dSmrgbe considered for the next release. If you are using the cache, and at 437bd0f98dSmrgsome point `config.cache' contains results you don't want to keep, you 447bd0f98dSmrgmay remove or edit it. 457bd0f98dSmrg 467bd0f98dSmrg The file `configure.ac' (or `configure.in') is used to create 477bd0f98dSmrg`configure' by a program called `autoconf'. You need `configure.ac' if 487bd0f98dSmrgyou want to change it or regenerate `configure' using a newer version 497bd0f98dSmrgof `autoconf'. 507bd0f98dSmrg 51e7c933f3Smrg The simplest way to compile this package is: 527bd0f98dSmrg 537bd0f98dSmrg 1. `cd' to the directory containing the package's source code and type 547bd0f98dSmrg `./configure' to configure the package for your system. 557bd0f98dSmrg 567bd0f98dSmrg Running `configure' might take a while. While running, it prints 577bd0f98dSmrg some messages telling which features it is checking for. 587bd0f98dSmrg 597bd0f98dSmrg 2. Type `make' to compile the package. 607bd0f98dSmrg 617bd0f98dSmrg 3. Optionally, type `make check' to run any self-tests that come with 62e7c933f3Smrg the package, generally using the just-built uninstalled binaries. 637bd0f98dSmrg 647bd0f98dSmrg 4. Type `make install' to install the programs and any data files and 65e7c933f3Smrg documentation. When installing into a prefix owned by root, it is 66e7c933f3Smrg recommended that the package be configured and built as a regular 67e7c933f3Smrg user, and only the `make install' phase executed with root 68e7c933f3Smrg privileges. 69e7c933f3Smrg 70e7c933f3Smrg 5. Optionally, type `make installcheck' to repeat any self-tests, but 71e7c933f3Smrg this time using the binaries in their final installed location. 72e7c933f3Smrg This target does not install anything. Running this target as a 73e7c933f3Smrg regular user, particularly if the prior `make install' required 74e7c933f3Smrg root privileges, verifies that the installation completed 75e7c933f3Smrg correctly. 76e7c933f3Smrg 77e7c933f3Smrg 6. You can remove the program binaries and object files from the 787bd0f98dSmrg source code directory by typing `make clean'. To also remove the 797bd0f98dSmrg files that `configure' created (so you can compile the package for 807bd0f98dSmrg a different kind of computer), type `make distclean'. There is 817bd0f98dSmrg also a `make maintainer-clean' target, but that is intended mainly 827bd0f98dSmrg for the package's developers. If you use it, you may have to get 837bd0f98dSmrg all sorts of other programs in order to regenerate files that came 847bd0f98dSmrg with the distribution. 857bd0f98dSmrg 86e7c933f3Smrg 7. Often, you can also type `make uninstall' to remove the installed 87e7c933f3Smrg files again. In practice, not all packages have tested that 88e7c933f3Smrg uninstallation works correctly, even though it is required by the 89e7c933f3Smrg GNU Coding Standards. 90e7c933f3Smrg 91e7c933f3Smrg 8. Some packages, particularly those that use Automake, provide `make 92e7c933f3Smrg distcheck', which can by used by developers to test that all other 93e7c933f3Smrg targets like `make install' and `make uninstall' work correctly. 94e7c933f3Smrg This target is generally not run by end users. 957bd0f98dSmrg 967bd0f98dSmrgCompilers and Options 977bd0f98dSmrg===================== 987bd0f98dSmrg 997bd0f98dSmrg Some systems require unusual options for compilation or linking that 1007bd0f98dSmrgthe `configure' script does not know about. Run `./configure --help' 1017bd0f98dSmrgfor details on some of the pertinent environment variables. 1027bd0f98dSmrg 1037bd0f98dSmrg You can give `configure' initial values for configuration parameters 1047bd0f98dSmrgby setting variables in the command line or in the environment. Here 1057bd0f98dSmrgis an example: 1067bd0f98dSmrg 1077bd0f98dSmrg ./configure CC=c99 CFLAGS=-g LIBS=-lposix 1087bd0f98dSmrg 1097bd0f98dSmrg *Note Defining Variables::, for more details. 1107bd0f98dSmrg 1117bd0f98dSmrgCompiling For Multiple Architectures 1127bd0f98dSmrg==================================== 1137bd0f98dSmrg 1147bd0f98dSmrg You can compile the package for more than one kind of computer at the 1157bd0f98dSmrgsame time, by placing the object files for each architecture in their 1167bd0f98dSmrgown directory. To do this, you can use GNU `make'. `cd' to the 1177bd0f98dSmrgdirectory where you want the object files and executables to go and run 1187bd0f98dSmrgthe `configure' script. `configure' automatically checks for the 119e7c933f3Smrgsource code in the directory that `configure' is in and in `..'. This 120e7c933f3Smrgis known as a "VPATH" build. 1217bd0f98dSmrg 1227bd0f98dSmrg With a non-GNU `make', it is safer to compile the package for one 1237bd0f98dSmrgarchitecture at a time in the source code directory. After you have 1247bd0f98dSmrginstalled the package for one architecture, use `make distclean' before 1257bd0f98dSmrgreconfiguring for another architecture. 1267bd0f98dSmrg 1277bd0f98dSmrg On MacOS X 10.5 and later systems, you can create libraries and 1287bd0f98dSmrgexecutables that work on multiple system types--known as "fat" or 1297bd0f98dSmrg"universal" binaries--by specifying multiple `-arch' options to the 1307bd0f98dSmrgcompiler but only a single `-arch' option to the preprocessor. Like 1317bd0f98dSmrgthis: 1327bd0f98dSmrg 1337bd0f98dSmrg ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1347bd0f98dSmrg CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 1357bd0f98dSmrg CPP="gcc -E" CXXCPP="g++ -E" 1367bd0f98dSmrg 1377bd0f98dSmrg This is not guaranteed to produce working output in all cases, you 1387bd0f98dSmrgmay have to build one architecture at a time and combine the results 1397bd0f98dSmrgusing the `lipo' tool if you have problems. 1407bd0f98dSmrg 1417bd0f98dSmrgInstallation Names 1427bd0f98dSmrg================== 1437bd0f98dSmrg 1447bd0f98dSmrg By default, `make install' installs the package's commands under 1457bd0f98dSmrg`/usr/local/bin', include files under `/usr/local/include', etc. You 1467bd0f98dSmrgcan specify an installation prefix other than `/usr/local' by giving 147e7c933f3Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an 148e7c933f3Smrgabsolute file name. 1497bd0f98dSmrg 1507bd0f98dSmrg You can specify separate installation prefixes for 1517bd0f98dSmrgarchitecture-specific files and architecture-independent files. If you 1527bd0f98dSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses 1537bd0f98dSmrgPREFIX as the prefix for installing programs and libraries. 1547bd0f98dSmrgDocumentation and other data files still use the regular prefix. 1557bd0f98dSmrg 1567bd0f98dSmrg In addition, if you use an unusual directory layout you can give 1577bd0f98dSmrgoptions like `--bindir=DIR' to specify different values for particular 1587bd0f98dSmrgkinds of files. Run `configure --help' for a list of the directories 159e7c933f3Smrgyou can set and what kinds of files go in them. In general, the 160e7c933f3Smrgdefault for these options is expressed in terms of `${prefix}', so that 161e7c933f3Smrgspecifying just `--prefix' will affect all of the other directory 162e7c933f3Smrgspecifications that were not explicitly provided. 163e7c933f3Smrg 164e7c933f3Smrg The most portable way to affect installation locations is to pass the 165e7c933f3Smrgcorrect locations to `configure'; however, many packages provide one or 166e7c933f3Smrgboth of the following shortcuts of passing variable assignments to the 167e7c933f3Smrg`make install' command line to change installation locations without 168e7c933f3Smrghaving to reconfigure or recompile. 169e7c933f3Smrg 170e7c933f3Smrg The first method involves providing an override variable for each 171e7c933f3Smrgaffected directory. For example, `make install 172e7c933f3Smrgprefix=/alternate/directory' will choose an alternate location for all 173e7c933f3Smrgdirectory configuration variables that were expressed in terms of 174e7c933f3Smrg`${prefix}'. Any directories that were specified during `configure', 175e7c933f3Smrgbut not in terms of `${prefix}', must each be overridden at install 176e7c933f3Smrgtime for the entire installation to be relocated. The approach of 177e7c933f3Smrgmakefile variable overrides for each directory variable is required by 178e7c933f3Smrgthe GNU Coding Standards, and ideally causes no recompilation. 179e7c933f3SmrgHowever, some platforms have known limitations with the semantics of 180e7c933f3Smrgshared libraries that end up requiring recompilation when using this 181e7c933f3Smrgmethod, particularly noticeable in packages that use GNU Libtool. 182e7c933f3Smrg 183e7c933f3Smrg The second method involves providing the `DESTDIR' variable. For 184e7c933f3Smrgexample, `make install DESTDIR=/alternate/directory' will prepend 185e7c933f3Smrg`/alternate/directory' before all installation names. The approach of 186e7c933f3Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and 187e7c933f3Smrgdoes not work on platforms that have drive letters. On the other hand, 188e7c933f3Smrgit does better at avoiding recompilation issues, and works well even 189e7c933f3Smrgwhen some directory options were not specified in terms of `${prefix}' 190e7c933f3Smrgat `configure' time. 191e7c933f3Smrg 192e7c933f3SmrgOptional Features 193e7c933f3Smrg================= 1947bd0f98dSmrg 1957bd0f98dSmrg If the package supports it, you can cause programs to be installed 1967bd0f98dSmrgwith an extra prefix or suffix on their names by giving `configure' the 1977bd0f98dSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 1987bd0f98dSmrg 1997bd0f98dSmrg Some packages pay attention to `--enable-FEATURE' options to 2007bd0f98dSmrg`configure', where FEATURE indicates an optional part of the package. 2017bd0f98dSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 2027bd0f98dSmrgis something like `gnu-as' or `x' (for the X Window System). The 2037bd0f98dSmrg`README' should mention any `--enable-' and `--with-' options that the 2047bd0f98dSmrgpackage recognizes. 2057bd0f98dSmrg 2067bd0f98dSmrg For packages that use the X Window System, `configure' can usually 2077bd0f98dSmrgfind the X include and library files automatically, but if it doesn't, 2087bd0f98dSmrgyou can use the `configure' options `--x-includes=DIR' and 2097bd0f98dSmrg`--x-libraries=DIR' to specify their locations. 2107bd0f98dSmrg 211e7c933f3Smrg Some packages offer the ability to configure how verbose the 212e7c933f3Smrgexecution of `make' will be. For these packages, running `./configure 213e7c933f3Smrg--enable-silent-rules' sets the default to minimal output, which can be 214e7c933f3Smrgoverridden with `make V=1'; while running `./configure 215e7c933f3Smrg--disable-silent-rules' sets the default to verbose, which can be 216e7c933f3Smrgoverridden with `make V=0'. 217e7c933f3Smrg 2187bd0f98dSmrgParticular systems 2197bd0f98dSmrg================== 2207bd0f98dSmrg 2217bd0f98dSmrg On HP-UX, the default C compiler is not ANSI C compatible. If GNU 2227bd0f98dSmrgCC is not installed, it is recommended to use the following options in 2237bd0f98dSmrgorder to use an ANSI C compiler: 2247bd0f98dSmrg 225e7c933f3Smrg ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 2267bd0f98dSmrg 2277bd0f98dSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX. 2287bd0f98dSmrg 229e7c933f3Smrg HP-UX `make' updates targets which have the same time stamps as 230e7c933f3Smrgtheir prerequisites, which makes it generally unusable when shipped 231e7c933f3Smrggenerated files such as `configure' are involved. Use GNU `make' 232e7c933f3Smrginstead. 233e7c933f3Smrg 2347bd0f98dSmrg On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 2357bd0f98dSmrgparse its `<wchar.h>' header file. The option `-nodtk' can be used as 2367bd0f98dSmrga workaround. If GNU CC is not installed, it is therefore recommended 2377bd0f98dSmrgto try 2387bd0f98dSmrg 2397bd0f98dSmrg ./configure CC="cc" 2407bd0f98dSmrg 2417bd0f98dSmrgand if that doesn't work, try 2427bd0f98dSmrg 2437bd0f98dSmrg ./configure CC="cc -nodtk" 2447bd0f98dSmrg 245e7c933f3Smrg On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246e7c933f3Smrgdirectory contains several dysfunctional programs; working variants of 247e7c933f3Smrgthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248e7c933f3Smrgin your `PATH', put it _after_ `/usr/bin'. 249e7c933f3Smrg 250e7c933f3Smrg On Haiku, software installed for all users goes in `/boot/common', 251e7c933f3Smrgnot `/usr/local'. It is recommended to use the following options: 252e7c933f3Smrg 253e7c933f3Smrg ./configure --prefix=/boot/common 254e7c933f3Smrg 2557bd0f98dSmrgSpecifying the System Type 2567bd0f98dSmrg========================== 2577bd0f98dSmrg 2587bd0f98dSmrg There may be some features `configure' cannot figure out 2597bd0f98dSmrgautomatically, but needs to determine by the type of machine the package 2607bd0f98dSmrgwill run on. Usually, assuming the package is built to be run on the 2617bd0f98dSmrg_same_ architectures, `configure' can figure that out, but if it prints 2627bd0f98dSmrga message saying it cannot guess the machine type, give it the 2637bd0f98dSmrg`--build=TYPE' option. TYPE can either be a short name for the system 2647bd0f98dSmrgtype, such as `sun4', or a canonical name which has the form: 2657bd0f98dSmrg 2667bd0f98dSmrg CPU-COMPANY-SYSTEM 2677bd0f98dSmrg 2687bd0f98dSmrgwhere SYSTEM can have one of these forms: 2697bd0f98dSmrg 270e7c933f3Smrg OS 271e7c933f3Smrg KERNEL-OS 2727bd0f98dSmrg 2737bd0f98dSmrg See the file `config.sub' for the possible values of each field. If 2747bd0f98dSmrg`config.sub' isn't included in this package, then this package doesn't 2757bd0f98dSmrgneed to know the machine type. 2767bd0f98dSmrg 2777bd0f98dSmrg If you are _building_ compiler tools for cross-compiling, you should 2787bd0f98dSmrguse the option `--target=TYPE' to select the type of system they will 2797bd0f98dSmrgproduce code for. 2807bd0f98dSmrg 2817bd0f98dSmrg If you want to _use_ a cross compiler, that generates code for a 2827bd0f98dSmrgplatform different from the build platform, you should specify the 2837bd0f98dSmrg"host" platform (i.e., that on which the generated programs will 2847bd0f98dSmrgeventually be run) with `--host=TYPE'. 2857bd0f98dSmrg 2867bd0f98dSmrgSharing Defaults 2877bd0f98dSmrg================ 2887bd0f98dSmrg 2897bd0f98dSmrg If you want to set default values for `configure' scripts to share, 2907bd0f98dSmrgyou can create a site shell script called `config.site' that gives 2917bd0f98dSmrgdefault values for variables like `CC', `cache_file', and `prefix'. 2927bd0f98dSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then 2937bd0f98dSmrg`PREFIX/etc/config.site' if it exists. Or, you can set the 2947bd0f98dSmrg`CONFIG_SITE' environment variable to the location of the site script. 2957bd0f98dSmrgA warning: not all `configure' scripts look for a site script. 2967bd0f98dSmrg 2977bd0f98dSmrgDefining Variables 2987bd0f98dSmrg================== 2997bd0f98dSmrg 3007bd0f98dSmrg Variables not defined in a site shell script can be set in the 3017bd0f98dSmrgenvironment passed to `configure'. However, some packages may run 3027bd0f98dSmrgconfigure again during the build, and the customized values of these 3037bd0f98dSmrgvariables may be lost. In order to avoid this problem, you should set 3047bd0f98dSmrgthem in the `configure' command line, using `VAR=value'. For example: 3057bd0f98dSmrg 3067bd0f98dSmrg ./configure CC=/usr/local2/bin/gcc 3077bd0f98dSmrg 3087bd0f98dSmrgcauses the specified `gcc' to be used as the C compiler (unless it is 3097bd0f98dSmrgoverridden in the site shell script). 3107bd0f98dSmrg 3117bd0f98dSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to 3127bd0f98dSmrgan Autoconf bug. Until the bug is fixed you can use this workaround: 3137bd0f98dSmrg 3147bd0f98dSmrg CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 3157bd0f98dSmrg 3167bd0f98dSmrg`configure' Invocation 3177bd0f98dSmrg====================== 3187bd0f98dSmrg 3197bd0f98dSmrg `configure' recognizes the following options to control how it 3207bd0f98dSmrgoperates. 3217bd0f98dSmrg 3227bd0f98dSmrg`--help' 3237bd0f98dSmrg`-h' 3247bd0f98dSmrg Print a summary of all of the options to `configure', and exit. 3257bd0f98dSmrg 3267bd0f98dSmrg`--help=short' 3277bd0f98dSmrg`--help=recursive' 3287bd0f98dSmrg Print a summary of the options unique to this package's 3297bd0f98dSmrg `configure', and exit. The `short' variant lists options used 3307bd0f98dSmrg only in the top level, while the `recursive' variant lists options 3317bd0f98dSmrg also present in any nested packages. 3327bd0f98dSmrg 3337bd0f98dSmrg`--version' 3347bd0f98dSmrg`-V' 3357bd0f98dSmrg Print the version of Autoconf used to generate the `configure' 3367bd0f98dSmrg script, and exit. 3377bd0f98dSmrg 3387bd0f98dSmrg`--cache-file=FILE' 3397bd0f98dSmrg Enable the cache: use and save the results of the tests in FILE, 3407bd0f98dSmrg traditionally `config.cache'. FILE defaults to `/dev/null' to 3417bd0f98dSmrg disable caching. 3427bd0f98dSmrg 3437bd0f98dSmrg`--config-cache' 3447bd0f98dSmrg`-C' 3457bd0f98dSmrg Alias for `--cache-file=config.cache'. 3467bd0f98dSmrg 3477bd0f98dSmrg`--quiet' 3487bd0f98dSmrg`--silent' 3497bd0f98dSmrg`-q' 3507bd0f98dSmrg Do not print messages saying which checks are being made. To 3517bd0f98dSmrg suppress all normal output, redirect it to `/dev/null' (any error 3527bd0f98dSmrg messages will still be shown). 3537bd0f98dSmrg 3547bd0f98dSmrg`--srcdir=DIR' 3557bd0f98dSmrg Look for the package's source code in directory DIR. Usually 3567bd0f98dSmrg `configure' can determine that directory automatically. 3577bd0f98dSmrg 3587bd0f98dSmrg`--prefix=DIR' 359e7c933f3Smrg Use DIR as the installation prefix. *note Installation Names:: 3607bd0f98dSmrg for more details, including other options available for fine-tuning 3617bd0f98dSmrg the installation locations. 3627bd0f98dSmrg 3637bd0f98dSmrg`--no-create' 3647bd0f98dSmrg`-n' 3657bd0f98dSmrg Run the configure checks, but stop before creating any output 3667bd0f98dSmrg files. 3677bd0f98dSmrg 3687bd0f98dSmrg`configure' also accepts some other, not widely useful, options. Run 3697bd0f98dSmrg`configure --help' for more details. 3707bd0f98dSmrg 371