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