1*10465441SEvalZeroInstallation Instructions 2*10465441SEvalZero************************* 3*10465441SEvalZero 4*10465441SEvalZeroCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5*10465441SEvalZero2006, 2007, 2008, 2009 Free Software Foundation, Inc. 6*10465441SEvalZero 7*10465441SEvalZero Copying and distribution of this file, with or without modification, 8*10465441SEvalZeroare permitted in any medium without royalty provided the copyright 9*10465441SEvalZeronotice and this notice are preserved. This file is offered as-is, 10*10465441SEvalZerowithout warranty of any kind. 11*10465441SEvalZero 12*10465441SEvalZeroBasic Installation 13*10465441SEvalZero================== 14*10465441SEvalZero 15*10465441SEvalZero Briefly, the shell commands `./configure; make; make install' should 16*10465441SEvalZeroconfigure, build, and install this package. The following 17*10465441SEvalZeromore-detailed instructions are generic; see the `README' file for 18*10465441SEvalZeroinstructions specific to this package. Some packages provide this 19*10465441SEvalZero`INSTALL' file but do not implement all of the features documented 20*10465441SEvalZerobelow. The lack of an optional feature in a given package is not 21*10465441SEvalZeronecessarily a bug. More recommendations for GNU packages can be found 22*10465441SEvalZeroin *note Makefile Conventions: (standards)Makefile Conventions. 23*10465441SEvalZero 24*10465441SEvalZero The `configure' shell script attempts to guess correct values for 25*10465441SEvalZerovarious system-dependent variables used during compilation. It uses 26*10465441SEvalZerothose values to create a `Makefile' in each directory of the package. 27*10465441SEvalZeroIt may also create one or more `.h' files containing system-dependent 28*10465441SEvalZerodefinitions. Finally, it creates a shell script `config.status' that 29*10465441SEvalZeroyou can run in the future to recreate the current configuration, and a 30*10465441SEvalZerofile `config.log' containing compiler output (useful mainly for 31*10465441SEvalZerodebugging `configure'). 32*10465441SEvalZero 33*10465441SEvalZero It can also use an optional file (typically called `config.cache' 34*10465441SEvalZeroand enabled with `--cache-file=config.cache' or simply `-C') that saves 35*10465441SEvalZerothe results of its tests to speed up reconfiguring. Caching is 36*10465441SEvalZerodisabled by default to prevent problems with accidental use of stale 37*10465441SEvalZerocache files. 38*10465441SEvalZero 39*10465441SEvalZero If you need to do unusual things to compile the package, please try 40*10465441SEvalZeroto figure out how `configure' could check whether to do them, and mail 41*10465441SEvalZerodiffs or instructions to the address given in the `README' so they can 42*10465441SEvalZerobe considered for the next release. If you are using the cache, and at 43*10465441SEvalZerosome point `config.cache' contains results you don't want to keep, you 44*10465441SEvalZeromay remove or edit it. 45*10465441SEvalZero 46*10465441SEvalZero The file `configure.ac' (or `configure.in') is used to create 47*10465441SEvalZero`configure' by a program called `autoconf'. You need `configure.ac' if 48*10465441SEvalZeroyou want to change it or regenerate `configure' using a newer version 49*10465441SEvalZeroof `autoconf'. 50*10465441SEvalZero 51*10465441SEvalZero The simplest way to compile this package is: 52*10465441SEvalZero 53*10465441SEvalZero 1. `cd' to the directory containing the package's source code and type 54*10465441SEvalZero `./configure' to configure the package for your system. 55*10465441SEvalZero 56*10465441SEvalZero Running `configure' might take a while. While running, it prints 57*10465441SEvalZero some messages telling which features it is checking for. 58*10465441SEvalZero 59*10465441SEvalZero 2. Type `make' to compile the package. 60*10465441SEvalZero 61*10465441SEvalZero 3. Optionally, type `make check' to run any self-tests that come with 62*10465441SEvalZero the package, generally using the just-built uninstalled binaries. 63*10465441SEvalZero 64*10465441SEvalZero 4. Type `make install' to install the programs and any data files and 65*10465441SEvalZero documentation. When installing into a prefix owned by root, it is 66*10465441SEvalZero recommended that the package be configured and built as a regular 67*10465441SEvalZero user, and only the `make install' phase executed with root 68*10465441SEvalZero privileges. 69*10465441SEvalZero 70*10465441SEvalZero 5. Optionally, type `make installcheck' to repeat any self-tests, but 71*10465441SEvalZero this time using the binaries in their final installed location. 72*10465441SEvalZero This target does not install anything. Running this target as a 73*10465441SEvalZero regular user, particularly if the prior `make install' required 74*10465441SEvalZero root privileges, verifies that the installation completed 75*10465441SEvalZero correctly. 76*10465441SEvalZero 77*10465441SEvalZero 6. You can remove the program binaries and object files from the 78*10465441SEvalZero source code directory by typing `make clean'. To also remove the 79*10465441SEvalZero files that `configure' created (so you can compile the package for 80*10465441SEvalZero a different kind of computer), type `make distclean'. There is 81*10465441SEvalZero also a `make maintainer-clean' target, but that is intended mainly 82*10465441SEvalZero for the package's developers. If you use it, you may have to get 83*10465441SEvalZero all sorts of other programs in order to regenerate files that came 84*10465441SEvalZero with the distribution. 85*10465441SEvalZero 86*10465441SEvalZero 7. Often, you can also type `make uninstall' to remove the installed 87*10465441SEvalZero files again. In practice, not all packages have tested that 88*10465441SEvalZero uninstallation works correctly, even though it is required by the 89*10465441SEvalZero GNU Coding Standards. 90*10465441SEvalZero 91*10465441SEvalZero 8. Some packages, particularly those that use Automake, provide `make 92*10465441SEvalZero distcheck', which can by used by developers to test that all other 93*10465441SEvalZero targets like `make install' and `make uninstall' work correctly. 94*10465441SEvalZero This target is generally not run by end users. 95*10465441SEvalZero 96*10465441SEvalZeroCompilers and Options 97*10465441SEvalZero===================== 98*10465441SEvalZero 99*10465441SEvalZero Some systems require unusual options for compilation or linking that 100*10465441SEvalZerothe `configure' script does not know about. Run `./configure --help' 101*10465441SEvalZerofor details on some of the pertinent environment variables. 102*10465441SEvalZero 103*10465441SEvalZero You can give `configure' initial values for configuration parameters 104*10465441SEvalZeroby setting variables in the command line or in the environment. Here 105*10465441SEvalZerois an example: 106*10465441SEvalZero 107*10465441SEvalZero ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108*10465441SEvalZero 109*10465441SEvalZero *Note Defining Variables::, for more details. 110*10465441SEvalZero 111*10465441SEvalZeroCompiling For Multiple Architectures 112*10465441SEvalZero==================================== 113*10465441SEvalZero 114*10465441SEvalZero You can compile the package for more than one kind of computer at the 115*10465441SEvalZerosame time, by placing the object files for each architecture in their 116*10465441SEvalZeroown directory. To do this, you can use GNU `make'. `cd' to the 117*10465441SEvalZerodirectory where you want the object files and executables to go and run 118*10465441SEvalZerothe `configure' script. `configure' automatically checks for the 119*10465441SEvalZerosource code in the directory that `configure' is in and in `..'. This 120*10465441SEvalZerois known as a "VPATH" build. 121*10465441SEvalZero 122*10465441SEvalZero With a non-GNU `make', it is safer to compile the package for one 123*10465441SEvalZeroarchitecture at a time in the source code directory. After you have 124*10465441SEvalZeroinstalled the package for one architecture, use `make distclean' before 125*10465441SEvalZeroreconfiguring for another architecture. 126*10465441SEvalZero 127*10465441SEvalZero On MacOS X 10.5 and later systems, you can create libraries and 128*10465441SEvalZeroexecutables that work on multiple system types--known as "fat" or 129*10465441SEvalZero"universal" binaries--by specifying multiple `-arch' options to the 130*10465441SEvalZerocompiler but only a single `-arch' option to the preprocessor. Like 131*10465441SEvalZerothis: 132*10465441SEvalZero 133*10465441SEvalZero ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134*10465441SEvalZero CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135*10465441SEvalZero CPP="gcc -E" CXXCPP="g++ -E" 136*10465441SEvalZero 137*10465441SEvalZero This is not guaranteed to produce working output in all cases, you 138*10465441SEvalZeromay have to build one architecture at a time and combine the results 139*10465441SEvalZerousing the `lipo' tool if you have problems. 140*10465441SEvalZero 141*10465441SEvalZeroInstallation Names 142*10465441SEvalZero================== 143*10465441SEvalZero 144*10465441SEvalZero By default, `make install' installs the package's commands under 145*10465441SEvalZero`/usr/local/bin', include files under `/usr/local/include', etc. You 146*10465441SEvalZerocan specify an installation prefix other than `/usr/local' by giving 147*10465441SEvalZero`configure' the option `--prefix=PREFIX', where PREFIX must be an 148*10465441SEvalZeroabsolute file name. 149*10465441SEvalZero 150*10465441SEvalZero You can specify separate installation prefixes for 151*10465441SEvalZeroarchitecture-specific files and architecture-independent files. If you 152*10465441SEvalZeropass the option `--exec-prefix=PREFIX' to `configure', the package uses 153*10465441SEvalZeroPREFIX as the prefix for installing programs and libraries. 154*10465441SEvalZeroDocumentation and other data files still use the regular prefix. 155*10465441SEvalZero 156*10465441SEvalZero In addition, if you use an unusual directory layout you can give 157*10465441SEvalZerooptions like `--bindir=DIR' to specify different values for particular 158*10465441SEvalZerokinds of files. Run `configure --help' for a list of the directories 159*10465441SEvalZeroyou can set and what kinds of files go in them. In general, the 160*10465441SEvalZerodefault for these options is expressed in terms of `${prefix}', so that 161*10465441SEvalZerospecifying just `--prefix' will affect all of the other directory 162*10465441SEvalZerospecifications that were not explicitly provided. 163*10465441SEvalZero 164*10465441SEvalZero The most portable way to affect installation locations is to pass the 165*10465441SEvalZerocorrect locations to `configure'; however, many packages provide one or 166*10465441SEvalZeroboth of the following shortcuts of passing variable assignments to the 167*10465441SEvalZero`make install' command line to change installation locations without 168*10465441SEvalZerohaving to reconfigure or recompile. 169*10465441SEvalZero 170*10465441SEvalZero The first method involves providing an override variable for each 171*10465441SEvalZeroaffected directory. For example, `make install 172*10465441SEvalZeroprefix=/alternate/directory' will choose an alternate location for all 173*10465441SEvalZerodirectory configuration variables that were expressed in terms of 174*10465441SEvalZero`${prefix}'. Any directories that were specified during `configure', 175*10465441SEvalZerobut not in terms of `${prefix}', must each be overridden at install 176*10465441SEvalZerotime for the entire installation to be relocated. The approach of 177*10465441SEvalZeromakefile variable overrides for each directory variable is required by 178*10465441SEvalZerothe GNU Coding Standards, and ideally causes no recompilation. 179*10465441SEvalZeroHowever, some platforms have known limitations with the semantics of 180*10465441SEvalZeroshared libraries that end up requiring recompilation when using this 181*10465441SEvalZeromethod, particularly noticeable in packages that use GNU Libtool. 182*10465441SEvalZero 183*10465441SEvalZero The second method involves providing the `DESTDIR' variable. For 184*10465441SEvalZeroexample, `make install DESTDIR=/alternate/directory' will prepend 185*10465441SEvalZero`/alternate/directory' before all installation names. The approach of 186*10465441SEvalZero`DESTDIR' overrides is not required by the GNU Coding Standards, and 187*10465441SEvalZerodoes not work on platforms that have drive letters. On the other hand, 188*10465441SEvalZeroit does better at avoiding recompilation issues, and works well even 189*10465441SEvalZerowhen some directory options were not specified in terms of `${prefix}' 190*10465441SEvalZeroat `configure' time. 191*10465441SEvalZero 192*10465441SEvalZeroOptional Features 193*10465441SEvalZero================= 194*10465441SEvalZero 195*10465441SEvalZero If the package supports it, you can cause programs to be installed 196*10465441SEvalZerowith an extra prefix or suffix on their names by giving `configure' the 197*10465441SEvalZerooption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198*10465441SEvalZero 199*10465441SEvalZero Some packages pay attention to `--enable-FEATURE' options to 200*10465441SEvalZero`configure', where FEATURE indicates an optional part of the package. 201*10465441SEvalZeroThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 202*10465441SEvalZerois something like `gnu-as' or `x' (for the X Window System). The 203*10465441SEvalZero`README' should mention any `--enable-' and `--with-' options that the 204*10465441SEvalZeropackage recognizes. 205*10465441SEvalZero 206*10465441SEvalZero For packages that use the X Window System, `configure' can usually 207*10465441SEvalZerofind the X include and library files automatically, but if it doesn't, 208*10465441SEvalZeroyou can use the `configure' options `--x-includes=DIR' and 209*10465441SEvalZero`--x-libraries=DIR' to specify their locations. 210*10465441SEvalZero 211*10465441SEvalZero Some packages offer the ability to configure how verbose the 212*10465441SEvalZeroexecution of `make' will be. For these packages, running `./configure 213*10465441SEvalZero--enable-silent-rules' sets the default to minimal output, which can be 214*10465441SEvalZerooverridden with `make V=1'; while running `./configure 215*10465441SEvalZero--disable-silent-rules' sets the default to verbose, which can be 216*10465441SEvalZerooverridden with `make V=0'. 217*10465441SEvalZero 218*10465441SEvalZeroParticular systems 219*10465441SEvalZero================== 220*10465441SEvalZero 221*10465441SEvalZero On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222*10465441SEvalZeroCC is not installed, it is recommended to use the following options in 223*10465441SEvalZeroorder to use an ANSI C compiler: 224*10465441SEvalZero 225*10465441SEvalZero ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226*10465441SEvalZero 227*10465441SEvalZeroand if that doesn't work, install pre-built binaries of GCC for HP-UX. 228*10465441SEvalZero 229*10465441SEvalZero On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 230*10465441SEvalZeroparse its `<wchar.h>' header file. The option `-nodtk' can be used as 231*10465441SEvalZeroa workaround. If GNU CC is not installed, it is therefore recommended 232*10465441SEvalZeroto try 233*10465441SEvalZero 234*10465441SEvalZero ./configure CC="cc" 235*10465441SEvalZero 236*10465441SEvalZeroand if that doesn't work, try 237*10465441SEvalZero 238*10465441SEvalZero ./configure CC="cc -nodtk" 239*10465441SEvalZero 240*10465441SEvalZero On Solaris, don't put `/usr/ucb' early in your `PATH'. This 241*10465441SEvalZerodirectory contains several dysfunctional programs; working variants of 242*10465441SEvalZerothese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 243*10465441SEvalZeroin your `PATH', put it _after_ `/usr/bin'. 244*10465441SEvalZero 245*10465441SEvalZero On Haiku, software installed for all users goes in `/boot/common', 246*10465441SEvalZeronot `/usr/local'. It is recommended to use the following options: 247*10465441SEvalZero 248*10465441SEvalZero ./configure --prefix=/boot/common 249*10465441SEvalZero 250*10465441SEvalZeroSpecifying the System Type 251*10465441SEvalZero========================== 252*10465441SEvalZero 253*10465441SEvalZero There may be some features `configure' cannot figure out 254*10465441SEvalZeroautomatically, but needs to determine by the type of machine the package 255*10465441SEvalZerowill run on. Usually, assuming the package is built to be run on the 256*10465441SEvalZero_same_ architectures, `configure' can figure that out, but if it prints 257*10465441SEvalZeroa message saying it cannot guess the machine type, give it the 258*10465441SEvalZero`--build=TYPE' option. TYPE can either be a short name for the system 259*10465441SEvalZerotype, such as `sun4', or a canonical name which has the form: 260*10465441SEvalZero 261*10465441SEvalZero CPU-COMPANY-SYSTEM 262*10465441SEvalZero 263*10465441SEvalZerowhere SYSTEM can have one of these forms: 264*10465441SEvalZero 265*10465441SEvalZero OS 266*10465441SEvalZero KERNEL-OS 267*10465441SEvalZero 268*10465441SEvalZero See the file `config.sub' for the possible values of each field. If 269*10465441SEvalZero`config.sub' isn't included in this package, then this package doesn't 270*10465441SEvalZeroneed to know the machine type. 271*10465441SEvalZero 272*10465441SEvalZero If you are _building_ compiler tools for cross-compiling, you should 273*10465441SEvalZerouse the option `--target=TYPE' to select the type of system they will 274*10465441SEvalZeroproduce code for. 275*10465441SEvalZero 276*10465441SEvalZero If you want to _use_ a cross compiler, that generates code for a 277*10465441SEvalZeroplatform different from the build platform, you should specify the 278*10465441SEvalZero"host" platform (i.e., that on which the generated programs will 279*10465441SEvalZeroeventually be run) with `--host=TYPE'. 280*10465441SEvalZero 281*10465441SEvalZeroSharing Defaults 282*10465441SEvalZero================ 283*10465441SEvalZero 284*10465441SEvalZero If you want to set default values for `configure' scripts to share, 285*10465441SEvalZeroyou can create a site shell script called `config.site' that gives 286*10465441SEvalZerodefault values for variables like `CC', `cache_file', and `prefix'. 287*10465441SEvalZero`configure' looks for `PREFIX/share/config.site' if it exists, then 288*10465441SEvalZero`PREFIX/etc/config.site' if it exists. Or, you can set the 289*10465441SEvalZero`CONFIG_SITE' environment variable to the location of the site script. 290*10465441SEvalZeroA warning: not all `configure' scripts look for a site script. 291*10465441SEvalZero 292*10465441SEvalZeroDefining Variables 293*10465441SEvalZero================== 294*10465441SEvalZero 295*10465441SEvalZero Variables not defined in a site shell script can be set in the 296*10465441SEvalZeroenvironment passed to `configure'. However, some packages may run 297*10465441SEvalZeroconfigure again during the build, and the customized values of these 298*10465441SEvalZerovariables may be lost. In order to avoid this problem, you should set 299*10465441SEvalZerothem in the `configure' command line, using `VAR=value'. For example: 300*10465441SEvalZero 301*10465441SEvalZero ./configure CC=/usr/local2/bin/gcc 302*10465441SEvalZero 303*10465441SEvalZerocauses the specified `gcc' to be used as the C compiler (unless it is 304*10465441SEvalZerooverridden in the site shell script). 305*10465441SEvalZero 306*10465441SEvalZeroUnfortunately, this technique does not work for `CONFIG_SHELL' due to 307*10465441SEvalZeroan Autoconf bug. Until the bug is fixed you can use this workaround: 308*10465441SEvalZero 309*10465441SEvalZero CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 310*10465441SEvalZero 311*10465441SEvalZero`configure' Invocation 312*10465441SEvalZero====================== 313*10465441SEvalZero 314*10465441SEvalZero `configure' recognizes the following options to control how it 315*10465441SEvalZerooperates. 316*10465441SEvalZero 317*10465441SEvalZero`--help' 318*10465441SEvalZero`-h' 319*10465441SEvalZero Print a summary of all of the options to `configure', and exit. 320*10465441SEvalZero 321*10465441SEvalZero`--help=short' 322*10465441SEvalZero`--help=recursive' 323*10465441SEvalZero Print a summary of the options unique to this package's 324*10465441SEvalZero `configure', and exit. The `short' variant lists options used 325*10465441SEvalZero only in the top level, while the `recursive' variant lists options 326*10465441SEvalZero also present in any nested packages. 327*10465441SEvalZero 328*10465441SEvalZero`--version' 329*10465441SEvalZero`-V' 330*10465441SEvalZero Print the version of Autoconf used to generate the `configure' 331*10465441SEvalZero script, and exit. 332*10465441SEvalZero 333*10465441SEvalZero`--cache-file=FILE' 334*10465441SEvalZero Enable the cache: use and save the results of the tests in FILE, 335*10465441SEvalZero traditionally `config.cache'. FILE defaults to `/dev/null' to 336*10465441SEvalZero disable caching. 337*10465441SEvalZero 338*10465441SEvalZero`--config-cache' 339*10465441SEvalZero`-C' 340*10465441SEvalZero Alias for `--cache-file=config.cache'. 341*10465441SEvalZero 342*10465441SEvalZero`--quiet' 343*10465441SEvalZero`--silent' 344*10465441SEvalZero`-q' 345*10465441SEvalZero Do not print messages saying which checks are being made. To 346*10465441SEvalZero suppress all normal output, redirect it to `/dev/null' (any error 347*10465441SEvalZero messages will still be shown). 348*10465441SEvalZero 349*10465441SEvalZero`--srcdir=DIR' 350*10465441SEvalZero Look for the package's source code in directory DIR. Usually 351*10465441SEvalZero `configure' can determine that directory automatically. 352*10465441SEvalZero 353*10465441SEvalZero`--prefix=DIR' 354*10465441SEvalZero Use DIR as the installation prefix. *note Installation Names:: 355*10465441SEvalZero for more details, including other options available for fine-tuning 356*10465441SEvalZero the installation locations. 357*10465441SEvalZero 358*10465441SEvalZero`--no-create' 359*10465441SEvalZero`-n' 360*10465441SEvalZero Run the configure checks, but stop before creating any output 361*10465441SEvalZero files. 362*10465441SEvalZero 363*10465441SEvalZero`configure' also accepts some other, not widely useful, options. Run 364*10465441SEvalZero`configure --help' for more details. 365*10465441SEvalZero 366