1ef01931fSBen GrasInstallation Instructions 2ef01931fSBen Gras************************* 3ef01931fSBen Gras 4ef01931fSBen GrasCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 5*835f6802SDirk Vogt2006, 2007, 2008, 2009 Free Software Foundation, Inc. 6ef01931fSBen Gras 7ef01931fSBen Gras This file is free documentation; the Free Software Foundation gives 8ef01931fSBen Grasunlimited permission to copy, distribute and modify it. 9ef01931fSBen Gras 10ef01931fSBen GrasBasic Installation 11ef01931fSBen Gras================== 12ef01931fSBen Gras 13ef01931fSBen Gras Briefly, the shell commands `./configure; make; make install' should 14ef01931fSBen Grasconfigure, build, and install this package. The following 15ef01931fSBen Grasmore-detailed instructions are generic; see the `README' file for 16ef01931fSBen Grasinstructions specific to this package. 17ef01931fSBen Gras 18ef01931fSBen Gras The `configure' shell script attempts to guess correct values for 19ef01931fSBen Grasvarious system-dependent variables used during compilation. It uses 20ef01931fSBen Grasthose values to create a `Makefile' in each directory of the package. 21ef01931fSBen GrasIt may also create one or more `.h' files containing system-dependent 22ef01931fSBen Grasdefinitions. Finally, it creates a shell script `config.status' that 23ef01931fSBen Grasyou can run in the future to recreate the current configuration, and a 24ef01931fSBen Grasfile `config.log' containing compiler output (useful mainly for 25ef01931fSBen Grasdebugging `configure'). 26ef01931fSBen Gras 27ef01931fSBen Gras It can also use an optional file (typically called `config.cache' 28ef01931fSBen Grasand enabled with `--cache-file=config.cache' or simply `-C') that saves 29ef01931fSBen Grasthe results of its tests to speed up reconfiguring. Caching is 30ef01931fSBen Grasdisabled by default to prevent problems with accidental use of stale 31ef01931fSBen Grascache files. 32ef01931fSBen Gras 33ef01931fSBen Gras If you need to do unusual things to compile the package, please try 34ef01931fSBen Grasto figure out how `configure' could check whether to do them, and mail 35ef01931fSBen Grasdiffs or instructions to the address given in the `README' so they can 36ef01931fSBen Grasbe considered for the next release. If you are using the cache, and at 37ef01931fSBen Grassome point `config.cache' contains results you don't want to keep, you 38ef01931fSBen Grasmay remove or edit it. 39ef01931fSBen Gras 40ef01931fSBen Gras The file `configure.ac' (or `configure.in') is used to create 41ef01931fSBen Gras`configure' by a program called `autoconf'. You need `configure.ac' if 42ef01931fSBen Grasyou want to change it or regenerate `configure' using a newer version 43ef01931fSBen Grasof `autoconf'. 44ef01931fSBen Gras 45ef01931fSBen GrasThe simplest way to compile this package is: 46ef01931fSBen Gras 47ef01931fSBen Gras 1. `cd' to the directory containing the package's source code and type 48ef01931fSBen Gras `./configure' to configure the package for your system. 49ef01931fSBen Gras 50ef01931fSBen Gras Running `configure' might take a while. While running, it prints 51ef01931fSBen Gras some messages telling which features it is checking for. 52ef01931fSBen Gras 53ef01931fSBen Gras 2. Type `make' to compile the package. 54ef01931fSBen Gras 55ef01931fSBen Gras 3. Optionally, type `make check' to run any self-tests that come with 56ef01931fSBen Gras the package. 57ef01931fSBen Gras 58ef01931fSBen Gras 4. Type `make install' to install the programs and any data files and 59ef01931fSBen Gras documentation. 60ef01931fSBen Gras 61ef01931fSBen Gras 5. You can remove the program binaries and object files from the 62ef01931fSBen Gras source code directory by typing `make clean'. To also remove the 63ef01931fSBen Gras files that `configure' created (so you can compile the package for 64ef01931fSBen Gras a different kind of computer), type `make distclean'. There is 65ef01931fSBen Gras also a `make maintainer-clean' target, but that is intended mainly 66ef01931fSBen Gras for the package's developers. If you use it, you may have to get 67ef01931fSBen Gras all sorts of other programs in order to regenerate files that came 68ef01931fSBen Gras with the distribution. 69ef01931fSBen Gras 70*835f6802SDirk Vogt 6. Often, you can also type `make uninstall' to remove the installed 71*835f6802SDirk Vogt files again. 72*835f6802SDirk Vogt 73ef01931fSBen GrasCompilers and Options 74ef01931fSBen Gras===================== 75ef01931fSBen Gras 76*835f6802SDirk Vogt Some systems require unusual options for compilation or linking that 77*835f6802SDirk Vogtthe `configure' script does not know about. Run `./configure --help' 78*835f6802SDirk Vogtfor details on some of the pertinent environment variables. 79ef01931fSBen Gras 80ef01931fSBen Gras You can give `configure' initial values for configuration parameters 81ef01931fSBen Grasby setting variables in the command line or in the environment. Here 82ef01931fSBen Grasis an example: 83ef01931fSBen Gras 84ef01931fSBen Gras ./configure CC=c99 CFLAGS=-g LIBS=-lposix 85ef01931fSBen Gras 86ef01931fSBen Gras *Note Defining Variables::, for more details. 87ef01931fSBen Gras 88ef01931fSBen GrasCompiling For Multiple Architectures 89ef01931fSBen Gras==================================== 90ef01931fSBen Gras 91ef01931fSBen Gras You can compile the package for more than one kind of computer at the 92ef01931fSBen Grassame time, by placing the object files for each architecture in their 93ef01931fSBen Grasown directory. To do this, you can use GNU `make'. `cd' to the 94ef01931fSBen Grasdirectory where you want the object files and executables to go and run 95ef01931fSBen Grasthe `configure' script. `configure' automatically checks for the 96ef01931fSBen Grassource code in the directory that `configure' is in and in `..'. 97ef01931fSBen Gras 98ef01931fSBen Gras With a non-GNU `make', it is safer to compile the package for one 99ef01931fSBen Grasarchitecture at a time in the source code directory. After you have 100ef01931fSBen Grasinstalled the package for one architecture, use `make distclean' before 101ef01931fSBen Grasreconfiguring for another architecture. 102ef01931fSBen Gras 103*835f6802SDirk Vogt On MacOS X 10.5 and later systems, you can create libraries and 104*835f6802SDirk Vogtexecutables that work on multiple system types--known as "fat" or 105*835f6802SDirk Vogt"universal" binaries--by specifying multiple `-arch' options to the 106*835f6802SDirk Vogtcompiler but only a single `-arch' option to the preprocessor. Like 107*835f6802SDirk Vogtthis: 108*835f6802SDirk Vogt 109*835f6802SDirk Vogt ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 110*835f6802SDirk Vogt CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 111*835f6802SDirk Vogt CPP="gcc -E" CXXCPP="g++ -E" 112*835f6802SDirk Vogt 113*835f6802SDirk Vogt This is not guaranteed to produce working output in all cases, you 114*835f6802SDirk Vogtmay have to build one architecture at a time and combine the results 115*835f6802SDirk Vogtusing the `lipo' tool if you have problems. 116*835f6802SDirk Vogt 117ef01931fSBen GrasInstallation Names 118ef01931fSBen Gras================== 119ef01931fSBen Gras 120ef01931fSBen Gras By default, `make install' installs the package's commands under 121ef01931fSBen Gras`/usr/local/bin', include files under `/usr/local/include', etc. You 122ef01931fSBen Grascan specify an installation prefix other than `/usr/local' by giving 123ef01931fSBen Gras`configure' the option `--prefix=PREFIX'. 124ef01931fSBen Gras 125ef01931fSBen Gras You can specify separate installation prefixes for 126ef01931fSBen Grasarchitecture-specific files and architecture-independent files. If you 127ef01931fSBen Graspass the option `--exec-prefix=PREFIX' to `configure', the package uses 128ef01931fSBen GrasPREFIX as the prefix for installing programs and libraries. 129ef01931fSBen GrasDocumentation and other data files still use the regular prefix. 130ef01931fSBen Gras 131ef01931fSBen Gras In addition, if you use an unusual directory layout you can give 132ef01931fSBen Grasoptions like `--bindir=DIR' to specify different values for particular 133ef01931fSBen Graskinds of files. Run `configure --help' for a list of the directories 134ef01931fSBen Grasyou can set and what kinds of files go in them. 135ef01931fSBen Gras 136ef01931fSBen Gras If the package supports it, you can cause programs to be installed 137ef01931fSBen Graswith an extra prefix or suffix on their names by giving `configure' the 138ef01931fSBen Grasoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 139ef01931fSBen Gras 140ef01931fSBen GrasOptional Features 141ef01931fSBen Gras================= 142ef01931fSBen Gras 143ef01931fSBen Gras Some packages pay attention to `--enable-FEATURE' options to 144ef01931fSBen Gras`configure', where FEATURE indicates an optional part of the package. 145ef01931fSBen GrasThey may also pay attention to `--with-PACKAGE' options, where PACKAGE 146ef01931fSBen Grasis something like `gnu-as' or `x' (for the X Window System). The 147ef01931fSBen Gras`README' should mention any `--enable-' and `--with-' options that the 148ef01931fSBen Graspackage recognizes. 149ef01931fSBen Gras 150ef01931fSBen Gras For packages that use the X Window System, `configure' can usually 151ef01931fSBen Grasfind the X include and library files automatically, but if it doesn't, 152ef01931fSBen Grasyou can use the `configure' options `--x-includes=DIR' and 153ef01931fSBen Gras`--x-libraries=DIR' to specify their locations. 154ef01931fSBen Gras 155*835f6802SDirk VogtParticular systems 156*835f6802SDirk Vogt================== 157*835f6802SDirk Vogt 158*835f6802SDirk Vogt On HP-UX, the default C compiler is not ANSI C compatible. If GNU 159*835f6802SDirk VogtCC is not installed, it is recommended to use the following options in 160*835f6802SDirk Vogtorder to use an ANSI C compiler: 161*835f6802SDirk Vogt 162*835f6802SDirk Vogt ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 163*835f6802SDirk Vogt 164*835f6802SDirk Vogtand if that doesn't work, install pre-built binaries of GCC for HP-UX. 165*835f6802SDirk Vogt 166*835f6802SDirk Vogt On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 167*835f6802SDirk Vogtparse its `<wchar.h>' header file. The option `-nodtk' can be used as 168*835f6802SDirk Vogta workaround. If GNU CC is not installed, it is therefore recommended 169*835f6802SDirk Vogtto try 170*835f6802SDirk Vogt 171*835f6802SDirk Vogt ./configure CC="cc" 172*835f6802SDirk Vogt 173*835f6802SDirk Vogtand if that doesn't work, try 174*835f6802SDirk Vogt 175*835f6802SDirk Vogt ./configure CC="cc -nodtk" 176*835f6802SDirk Vogt 177*835f6802SDirk Vogt On Solaris, don't put `/usr/ucb' early in your `PATH'. This 178*835f6802SDirk Vogtdirectory contains several dysfunctional programs; working variants of 179*835f6802SDirk Vogtthese programs are available in `/usr/bin'. So, if you need `/usr/ucb' 180*835f6802SDirk Vogtin your `PATH', put it _after_ `/usr/bin'. 181*835f6802SDirk Vogt 182*835f6802SDirk Vogt On Haiku, software installed for all users goes in `/boot/common', 183*835f6802SDirk Vogtnot `/usr/local'. It is recommended to use the following options: 184*835f6802SDirk Vogt 185*835f6802SDirk Vogt ./configure --prefix=/boot/common 186*835f6802SDirk Vogt 187ef01931fSBen GrasSpecifying the System Type 188ef01931fSBen Gras========================== 189ef01931fSBen Gras 190*835f6802SDirk Vogt There may be some features `configure' cannot figure out 191*835f6802SDirk Vogtautomatically, but needs to determine by the type of machine the package 192*835f6802SDirk Vogtwill run on. Usually, assuming the package is built to be run on the 193*835f6802SDirk Vogt_same_ architectures, `configure' can figure that out, but if it prints 194*835f6802SDirk Vogta message saying it cannot guess the machine type, give it the 195ef01931fSBen Gras`--build=TYPE' option. TYPE can either be a short name for the system 196ef01931fSBen Grastype, such as `sun4', or a canonical name which has the form: 197ef01931fSBen Gras 198ef01931fSBen Gras CPU-COMPANY-SYSTEM 199ef01931fSBen Gras 200ef01931fSBen Graswhere SYSTEM can have one of these forms: 201ef01931fSBen Gras 202*835f6802SDirk Vogt OS 203*835f6802SDirk Vogt KERNEL-OS 204ef01931fSBen Gras 205ef01931fSBen Gras See the file `config.sub' for the possible values of each field. If 206ef01931fSBen Gras`config.sub' isn't included in this package, then this package doesn't 207ef01931fSBen Grasneed to know the machine type. 208ef01931fSBen Gras 209ef01931fSBen Gras If you are _building_ compiler tools for cross-compiling, you should 210ef01931fSBen Grasuse the option `--target=TYPE' to select the type of system they will 211ef01931fSBen Grasproduce code for. 212ef01931fSBen Gras 213ef01931fSBen Gras If you want to _use_ a cross compiler, that generates code for a 214ef01931fSBen Grasplatform different from the build platform, you should specify the 215ef01931fSBen Gras"host" platform (i.e., that on which the generated programs will 216ef01931fSBen Graseventually be run) with `--host=TYPE'. 217ef01931fSBen Gras 218ef01931fSBen GrasSharing Defaults 219ef01931fSBen Gras================ 220ef01931fSBen Gras 221*835f6802SDirk Vogt If you want to set default values for `configure' scripts to share, 222*835f6802SDirk Vogtyou can create a site shell script called `config.site' that gives 223*835f6802SDirk Vogtdefault values for variables like `CC', `cache_file', and `prefix'. 224ef01931fSBen Gras`configure' looks for `PREFIX/share/config.site' if it exists, then 225ef01931fSBen Gras`PREFIX/etc/config.site' if it exists. Or, you can set the 226ef01931fSBen Gras`CONFIG_SITE' environment variable to the location of the site script. 227ef01931fSBen GrasA warning: not all `configure' scripts look for a site script. 228ef01931fSBen Gras 229ef01931fSBen GrasDefining Variables 230ef01931fSBen Gras================== 231ef01931fSBen Gras 232ef01931fSBen Gras Variables not defined in a site shell script can be set in the 233ef01931fSBen Grasenvironment passed to `configure'. However, some packages may run 234ef01931fSBen Grasconfigure again during the build, and the customized values of these 235ef01931fSBen Grasvariables may be lost. In order to avoid this problem, you should set 236ef01931fSBen Grasthem in the `configure' command line, using `VAR=value'. For example: 237ef01931fSBen Gras 238ef01931fSBen Gras ./configure CC=/usr/local2/bin/gcc 239ef01931fSBen Gras 240ef01931fSBen Grascauses the specified `gcc' to be used as the C compiler (unless it is 241ef01931fSBen Grasoverridden in the site shell script). 242ef01931fSBen Gras 243ef01931fSBen GrasUnfortunately, this technique does not work for `CONFIG_SHELL' due to 244ef01931fSBen Grasan Autoconf bug. Until the bug is fixed you can use this workaround: 245ef01931fSBen Gras 246ef01931fSBen Gras CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash 247ef01931fSBen Gras 248ef01931fSBen Gras`configure' Invocation 249ef01931fSBen Gras====================== 250ef01931fSBen Gras 251*835f6802SDirk Vogt `configure' recognizes the following options to control how it 252*835f6802SDirk Vogtoperates. 253ef01931fSBen Gras 254ef01931fSBen Gras`--help' 255ef01931fSBen Gras`-h' 256*835f6802SDirk Vogt Print a summary of all of the options to `configure', and exit. 257*835f6802SDirk Vogt 258*835f6802SDirk Vogt`--help=short' 259*835f6802SDirk Vogt`--help=recursive' 260*835f6802SDirk Vogt Print a summary of the options unique to this package's 261*835f6802SDirk Vogt `configure', and exit. The `short' variant lists options used 262*835f6802SDirk Vogt only in the top level, while the `recursive' variant lists options 263*835f6802SDirk Vogt also present in any nested packages. 264ef01931fSBen Gras 265ef01931fSBen Gras`--version' 266ef01931fSBen Gras`-V' 267ef01931fSBen Gras Print the version of Autoconf used to generate the `configure' 268ef01931fSBen Gras script, and exit. 269ef01931fSBen Gras 270ef01931fSBen Gras`--cache-file=FILE' 271ef01931fSBen Gras Enable the cache: use and save the results of the tests in FILE, 272ef01931fSBen Gras traditionally `config.cache'. FILE defaults to `/dev/null' to 273ef01931fSBen Gras disable caching. 274ef01931fSBen Gras 275ef01931fSBen Gras`--config-cache' 276ef01931fSBen Gras`-C' 277ef01931fSBen Gras Alias for `--cache-file=config.cache'. 278ef01931fSBen Gras 279ef01931fSBen Gras`--quiet' 280ef01931fSBen Gras`--silent' 281ef01931fSBen Gras`-q' 282ef01931fSBen Gras Do not print messages saying which checks are being made. To 283ef01931fSBen Gras suppress all normal output, redirect it to `/dev/null' (any error 284ef01931fSBen Gras messages will still be shown). 285ef01931fSBen Gras 286ef01931fSBen Gras`--srcdir=DIR' 287ef01931fSBen Gras Look for the package's source code in directory DIR. Usually 288ef01931fSBen Gras `configure' can determine that directory automatically. 289ef01931fSBen Gras 290*835f6802SDirk Vogt`--prefix=DIR' 291*835f6802SDirk Vogt Use DIR as the installation prefix. *Note Installation Names:: 292*835f6802SDirk Vogt for more details, including other options available for fine-tuning 293*835f6802SDirk Vogt the installation locations. 294*835f6802SDirk Vogt 295*835f6802SDirk Vogt`--no-create' 296*835f6802SDirk Vogt`-n' 297*835f6802SDirk Vogt Run the configure checks, but stop before creating any output 298*835f6802SDirk Vogt files. 299*835f6802SDirk Vogt 300ef01931fSBen Gras`configure' also accepts some other, not widely useful, options. Run 301ef01931fSBen Gras`configure --help' for more details. 302ef01931fSBen Gras 303