Blame INSTALL

Packit 18d29c
Installation Instructions
Packit 18d29c
*************************
Packit 18d29c
Packit 18d29c
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
Packit 18d29c
2006, 2007 Free Software Foundation, Inc.
Packit 18d29c
Packit 18d29c
This file is free documentation; the Free Software Foundation gives
Packit 18d29c
unlimited permission to copy, distribute and modify it.
Packit 18d29c
Packit 18d29c
Glog-Specific Install Notes
Packit 18d29c
================================
Packit 18d29c
Packit 18d29c
*** NOTE FOR 64-BIT LINUX SYSTEMS
Packit 18d29c
Packit 18d29c
The glibc built-in stack-unwinder on 64-bit systems has some problems
Packit 18d29c
with the glog libraries.  (In particular, if you are using
Packit 18d29c
InstallFailureSignalHandler(), the signal may be raised in the middle
Packit 18d29c
of malloc, holding some malloc-related locks when they invoke the
Packit 18d29c
stack unwinder.  The built-in stack unwinder may call malloc
Packit 18d29c
recursively, which may require the thread to acquire a lock it already
Packit 18d29c
holds: deadlock.)
Packit 18d29c
Packit 18d29c
For that reason, if you use a 64-bit system and you need
Packit 18d29c
InstallFailureSignalHandler(), we strongly recommend you install
Packit 18d29c
libunwind before trying to configure or install google glog.
Packit 18d29c
libunwind can be found at
Packit 18d29c
Packit 18d29c
   http://download.savannah.nongnu.org/releases/libunwind/libunwind-snap-070410.tar.gz
Packit 18d29c
Packit 18d29c
Even if you already have libunwind installed, you will probably still
Packit 18d29c
need to install from the snapshot to get the latest version.
Packit 18d29c
Packit 18d29c
CAUTION: if you install libunwind from the URL above, be aware that
Packit 18d29c
you may have trouble if you try to statically link your binary with
Packit 18d29c
glog: that is, if you link with 'gcc -static -lgcc_eh ...'.  This
Packit 18d29c
is because both libunwind and libgcc implement the same C++ exception
Packit 18d29c
handling APIs, but they implement them differently on some platforms.
Packit 18d29c
This is not likely to be a problem on ia64, but may be on x86-64.
Packit 18d29c
Packit 18d29c
Also, if you link binaries statically, make sure that you add
Packit 18d29c
-Wl,--eh-frame-hdr to your linker options. This is required so that
Packit 18d29c
libunwind can find the information generated by the compiler required
Packit 18d29c
for stack unwinding.
Packit 18d29c
Packit 18d29c
Using -static is rare, though, so unless you know this will affect you
Packit 18d29c
it probably won't.
Packit 18d29c
Packit 18d29c
If you cannot or do not wish to install libunwind, you can still try
Packit 18d29c
to use two kinds of stack-unwinder: 1. glibc built-in stack-unwinder
Packit 18d29c
and 2. frame pointer based stack-unwinder.
Packit 18d29c
Packit 18d29c
1. As we already mentioned, glibc's unwinder has a deadlock issue.
Packit 18d29c
However, if you don't use InstallFailureSignalHandler() or you don't
Packit 18d29c
worry about the rare possibilities of deadlocks, you can use this
Packit 18d29c
stack-unwinder.  If you specify no options and libunwind isn't
Packit 18d29c
detected on your system, the configure script chooses this unwinder by
Packit 18d29c
default.
Packit 18d29c
Packit 18d29c
2. The frame pointer based stack unwinder requires that your
Packit 18d29c
application, the glog library, and system libraries like libc, all be
Packit 18d29c
compiled with a frame pointer.  This is *not* the default for x86-64.
Packit 18d29c
Packit 18d29c
If you are on x86-64 system, know that you have a set of system
Packit 18d29c
libraries with frame-pointers enabled, and compile all your
Packit 18d29c
applications with -fno-omit-frame-pointer, then you can enable the
Packit 18d29c
frame pointer based stack unwinder by passing the
Packit 18d29c
--enable-frame-pointers flag to configure.
Packit 18d29c
Packit 18d29c
Packit 18d29c
Basic Installation
Packit 18d29c
==================
Packit 18d29c
Packit 18d29c
Briefly, the shell commands `./configure; make; make install' should
Packit 18d29c
configure, build, and install this package.  The following
Packit 18d29c
more-detailed instructions are generic; see the `README' file for
Packit 18d29c
instructions specific to this package.
Packit 18d29c
Packit 18d29c
   The `configure' shell script attempts to guess correct values for
Packit 18d29c
various system-dependent variables used during compilation.  It uses
Packit 18d29c
those values to create a `Makefile' in each directory of the package.
Packit 18d29c
It may also create one or more `.h' files containing system-dependent
Packit 18d29c
definitions.  Finally, it creates a shell script `config.status' that
Packit 18d29c
you can run in the future to recreate the current configuration, and a
Packit 18d29c
file `config.log' containing compiler output (useful mainly for
Packit 18d29c
debugging `configure').
Packit 18d29c
Packit 18d29c
   It can also use an optional file (typically called `config.cache'
Packit 18d29c
and enabled with `--cache-file=config.cache' or simply `-C') that saves
Packit 18d29c
the results of its tests to speed up reconfiguring.  Caching is
Packit 18d29c
disabled by default to prevent problems with accidental use of stale
Packit 18d29c
cache files.
Packit 18d29c
Packit 18d29c
   If you need to do unusual things to compile the package, please try
Packit 18d29c
to figure out how `configure' could check whether to do them, and mail
Packit 18d29c
diffs or instructions to the address given in the `README' so they can
Packit 18d29c
be considered for the next release.  If you are using the cache, and at
Packit 18d29c
some point `config.cache' contains results you don't want to keep, you
Packit 18d29c
may remove or edit it.
Packit 18d29c
Packit 18d29c
   The file `configure.ac' (or `configure.in') is used to create
Packit 18d29c
`configure' by a program called `autoconf'.  You need `configure.ac' if
Packit 18d29c
you want to change it or regenerate `configure' using a newer version
Packit 18d29c
of `autoconf'.
Packit 18d29c
Packit 18d29c
The simplest way to compile this package is:
Packit 18d29c
Packit 18d29c
  1. `cd' to the directory containing the package's source code and type
Packit 18d29c
     `./configure' to configure the package for your system.
Packit 18d29c
Packit 18d29c
     Running `configure' might take a while.  While running, it prints
Packit 18d29c
     some messages telling which features it is checking for.
Packit 18d29c
Packit 18d29c
  2. Type `make' to compile the package.
Packit 18d29c
Packit 18d29c
  3. Optionally, type `make check' to run any self-tests that come with
Packit 18d29c
     the package.
Packit 18d29c
Packit 18d29c
  4. Type `make install' to install the programs and any data files and
Packit 18d29c
     documentation.
Packit 18d29c
Packit 18d29c
  5. You can remove the program binaries and object files from the
Packit 18d29c
     source code directory by typing `make clean'.  To also remove the
Packit 18d29c
     files that `configure' created (so you can compile the package for
Packit 18d29c
     a different kind of computer), type `make distclean'.  There is
Packit 18d29c
     also a `make maintainer-clean' target, but that is intended mainly
Packit 18d29c
     for the package's developers.  If you use it, you may have to get
Packit 18d29c
     all sorts of other programs in order to regenerate files that came
Packit 18d29c
     with the distribution.
Packit 18d29c
Packit 18d29c
  6. Often, you can also type `make uninstall' to remove the installed
Packit 18d29c
     files again.
Packit 18d29c
Packit 18d29c
Compilers and Options
Packit 18d29c
=====================
Packit 18d29c
Packit 18d29c
Some systems require unusual options for compilation or linking that the
Packit 18d29c
`configure' script does not know about.  Run `./configure --help' for
Packit 18d29c
details on some of the pertinent environment variables.
Packit 18d29c
Packit 18d29c
   You can give `configure' initial values for configuration parameters
Packit 18d29c
by setting variables in the command line or in the environment.  Here
Packit 18d29c
is an example:
Packit 18d29c
Packit 18d29c
     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
Packit 18d29c
Packit 18d29c
   *Note Defining Variables::, for more details.
Packit 18d29c
Packit 18d29c
Compiling For Multiple Architectures
Packit 18d29c
====================================
Packit 18d29c
Packit 18d29c
You can compile the package for more than one kind of computer at the
Packit 18d29c
same time, by placing the object files for each architecture in their
Packit 18d29c
own directory.  To do this, you can use GNU `make'.  `cd' to the
Packit 18d29c
directory where you want the object files and executables to go and run
Packit 18d29c
the `configure' script.  `configure' automatically checks for the
Packit 18d29c
source code in the directory that `configure' is in and in `..'.
Packit 18d29c
Packit 18d29c
   With a non-GNU `make', it is safer to compile the package for one
Packit 18d29c
architecture at a time in the source code directory.  After you have
Packit 18d29c
installed the package for one architecture, use `make distclean' before
Packit 18d29c
reconfiguring for another architecture.
Packit 18d29c
Packit 18d29c
Installation Names
Packit 18d29c
==================
Packit 18d29c
Packit 18d29c
By default, `make install' installs the package's commands under
Packit 18d29c
`/usr/local/bin', include files under `/usr/local/include', etc.  You
Packit 18d29c
can specify an installation prefix other than `/usr/local' by giving
Packit 18d29c
`configure' the option `--prefix=PREFIX'.
Packit 18d29c
Packit 18d29c
   You can specify separate installation prefixes for
Packit 18d29c
architecture-specific files and architecture-independent files.  If you
Packit 18d29c
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
Packit 18d29c
PREFIX as the prefix for installing programs and libraries.
Packit 18d29c
Documentation and other data files still use the regular prefix.
Packit 18d29c
Packit 18d29c
   In addition, if you use an unusual directory layout you can give
Packit 18d29c
options like `--bindir=DIR' to specify different values for particular
Packit 18d29c
kinds of files.  Run `configure --help' for a list of the directories
Packit 18d29c
you can set and what kinds of files go in them.
Packit 18d29c
Packit 18d29c
   If the package supports it, you can cause programs to be installed
Packit 18d29c
with an extra prefix or suffix on their names by giving `configure' the
Packit 18d29c
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Packit 18d29c
Packit 18d29c
Optional Features
Packit 18d29c
=================
Packit 18d29c
Packit 18d29c
Some packages pay attention to `--enable-FEATURE' options to
Packit 18d29c
`configure', where FEATURE indicates an optional part of the package.
Packit 18d29c
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
Packit 18d29c
is something like `gnu-as' or `x' (for the X Window System).  The
Packit 18d29c
`README' should mention any `--enable-' and `--with-' options that the
Packit 18d29c
package recognizes.
Packit 18d29c
Packit 18d29c
   For packages that use the X Window System, `configure' can usually
Packit 18d29c
find the X include and library files automatically, but if it doesn't,
Packit 18d29c
you can use the `configure' options `--x-includes=DIR' and
Packit 18d29c
`--x-libraries=DIR' to specify their locations.
Packit 18d29c
Packit 18d29c
Specifying the System Type
Packit 18d29c
==========================
Packit 18d29c
Packit 18d29c
There may be some features `configure' cannot figure out automatically,
Packit 18d29c
but needs to determine by the type of machine the package will run on.
Packit 18d29c
Usually, assuming the package is built to be run on the _same_
Packit 18d29c
architectures, `configure' can figure that out, but if it prints a
Packit 18d29c
message saying it cannot guess the machine type, give it the
Packit 18d29c
`--build=TYPE' option.  TYPE can either be a short name for the system
Packit 18d29c
type, such as `sun4', or a canonical name which has the form:
Packit 18d29c
Packit 18d29c
     CPU-COMPANY-SYSTEM
Packit 18d29c
Packit 18d29c
where SYSTEM can have one of these forms:
Packit 18d29c
Packit 18d29c
     OS KERNEL-OS
Packit 18d29c
Packit 18d29c
   See the file `config.sub' for the possible values of each field.  If
Packit 18d29c
`config.sub' isn't included in this package, then this package doesn't
Packit 18d29c
need to know the machine type.
Packit 18d29c
Packit 18d29c
   If you are _building_ compiler tools for cross-compiling, you should
Packit 18d29c
use the option `--target=TYPE' to select the type of system they will
Packit 18d29c
produce code for.
Packit 18d29c
Packit 18d29c
   If you want to _use_ a cross compiler, that generates code for a
Packit 18d29c
platform different from the build platform, you should specify the
Packit 18d29c
"host" platform (i.e., that on which the generated programs will
Packit 18d29c
eventually be run) with `--host=TYPE'.
Packit 18d29c
Packit 18d29c
Sharing Defaults
Packit 18d29c
================
Packit 18d29c
Packit 18d29c
If you want to set default values for `configure' scripts to share, you
Packit 18d29c
can create a site shell script called `config.site' that gives default
Packit 18d29c
values for variables like `CC', `cache_file', and `prefix'.
Packit 18d29c
`configure' looks for `PREFIX/share/config.site' if it exists, then
Packit 18d29c
`PREFIX/etc/config.site' if it exists.  Or, you can set the
Packit 18d29c
`CONFIG_SITE' environment variable to the location of the site script.
Packit 18d29c
A warning: not all `configure' scripts look for a site script.
Packit 18d29c
Packit 18d29c
Defining Variables
Packit 18d29c
==================
Packit 18d29c
Packit 18d29c
Variables not defined in a site shell script can be set in the
Packit 18d29c
environment passed to `configure'.  However, some packages may run
Packit 18d29c
configure again during the build, and the customized values of these
Packit 18d29c
variables may be lost.  In order to avoid this problem, you should set
Packit 18d29c
them in the `configure' command line, using `VAR=value'.  For example:
Packit 18d29c
Packit 18d29c
     ./configure CC=/usr/local2/bin/gcc
Packit 18d29c
Packit 18d29c
causes the specified `gcc' to be used as the C compiler (unless it is
Packit 18d29c
overridden in the site shell script).
Packit 18d29c
Packit 18d29c
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
Packit 18d29c
an Autoconf bug.  Until the bug is fixed you can use this workaround:
Packit 18d29c
Packit 18d29c
     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
Packit 18d29c
Packit 18d29c
`configure' Invocation
Packit 18d29c
======================
Packit 18d29c
Packit 18d29c
`configure' recognizes the following options to control how it operates.
Packit 18d29c
Packit 18d29c
`--help'
Packit 18d29c
`-h'
Packit 18d29c
     Print a summary of the options to `configure', and exit.
Packit 18d29c
Packit 18d29c
`--version'
Packit 18d29c
`-V'
Packit 18d29c
     Print the version of Autoconf used to generate the `configure'
Packit 18d29c
     script, and exit.
Packit 18d29c
Packit 18d29c
`--cache-file=FILE'
Packit 18d29c
     Enable the cache: use and save the results of the tests in FILE,
Packit 18d29c
     traditionally `config.cache'.  FILE defaults to `/dev/null' to
Packit 18d29c
     disable caching.
Packit 18d29c
Packit 18d29c
`--config-cache'
Packit 18d29c
`-C'
Packit 18d29c
     Alias for `--cache-file=config.cache'.
Packit 18d29c
Packit 18d29c
`--quiet'
Packit 18d29c
`--silent'
Packit 18d29c
`-q'
Packit 18d29c
     Do not print messages saying which checks are being made.  To
Packit 18d29c
     suppress all normal output, redirect it to `/dev/null' (any error
Packit 18d29c
     messages will still be shown).
Packit 18d29c
Packit 18d29c
`--srcdir=DIR'
Packit 18d29c
     Look for the package's source code in directory DIR.  Usually
Packit 18d29c
     `configure' can determine that directory automatically.
Packit 18d29c
Packit 18d29c
`configure' also accepts some other, not widely useful, options.  Run
Packit 18d29c
`configure --help' for more details.
Packit 18d29c