gecko-dev/db/build.unix/README

243 строки
7.9 KiB
Plaintext

# @(#)README 8.24 (Sleepycat) 6/2/98
This is a directory for building UNIX versions of DB.
To build the default configuration of DB, simply enter the two commands:
../dist/configure
make
in this directory. This will build the DB library. To install the DB
library, enter:
make install
See below for specific information on what files are installed and in what
directories, and how to configure installation on a per-system basis.
If you want to rebuild DB, enter:
make clean
make
If you change your mind about how DB is configured, you must start from
scratch by entering:
make distclean
../dist/configure
make
To build multiple UNIX versions of DB in the same source tree, create a
new directory at the same level as build.unix, and then configure and build.
mkdir build.bsdos3.0
cd build.bsdos3.0
../dist/configure
make
If you have trouble with any of these commands, please send email to the
addresses found in the ../README file. In that email, please provide a
complete copy of the commands that you entered and their output.
=-=-=-=-=-=-=
DB'S OPTIONS TO THE CONFIGURE PROGRAM
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
There are many options that you can enter to the configuration program,
only a few of which are DB specific. To see a complete list of the
options, enter "../dist/configure --help".
The DB specific options are as follows:
--enable-cxx:
If you want to include C++ interfaces in the library, enter:
--enable-cxx
as an argument to configure.
--enable-debug:
If you want to build DB with -g as a compiler flag and with DEBUG
#defined during compilation, enter:
--enable-debug
as an argument to configure. This will create DB with debugging
symbols, as well as load various routines that can be called from
a debugger to display pages, cursor queues and so forth. This
flag should probably not be defined when configuring to build
production binaries, although there shouldn't be any significant
performance degradation.
--enable-diagnostic:
If you want to build DB with debugging run-time sanity checks and
with DIAGNOSTIC #defined during compilation, enter:
--enable-diagnostic
as an argument to configure. This will cause a number of special
checks to be performed when DB is running. This flag should NOT
be defined when configuring to build production binaries, as you
will lose a significant amount of performance.
--enable-compat185
If you want to compile or load DB 1.85 applications against the
DB 2.0 library, enter:
--enable-compat185
as an argument to configure. This will include DB 1.85 API
compatibility code in the library.
--enable-dump185:
If you need to convert DB 1.85 (or earlier) databases to DB 2.0
databases, enter:
--enable-dump185
as an argument to configure. This will build the dump_185(1)
utility. This utility will dump DB 1.85 databases in a format
readable by the db_load(1) utility. For more information, see
db_dump(1) and db_load(1).
The system libraries with which you are loading the dump_185(1)
utility MUST already contain the DB 1.85 library routines for this
to work, as the DB distribution does not include them. If you
are using a non-standard library for the DB 1.85 library routines,
you will have to change the Makefile that configure creates to
load dump_185 with that library.
--enable-test:
If you want to build the Tcl test suite, enter:
--enable-test
as an argument to configure. Note, the Tcl test suite will only
build if the Tcl libraries and include files are found.
--disable-bigfile:
Some systems, notably versions of AIX, HP/UX and Solaris, require
special compile-time options in order to create files larger than
2^32 bytes. These options are automatically enabled when DB is
compiled. For this reason, binaries built on current versions of
these systems may not run on earlier versions of the system, as
the library and system calls necessary for large files are not
available. To disable building with these compile-time options,
enter:
--disable-bigfile
as an argument to configure.
=-=-=-=-=-=-=
RUNNING THE DB TEST SUITE
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The DB test suite is built if you specify --enable-test as an argument to
configure and the Tcl libraries are found on your system. (The libraries
that DB needs to build the test suite are -ltcl and -lm.) For more
information on running DB's test suite and debugging the DB package, see
the file file ../test/README.
=-=-=-=-=-=-=
CHANGING COMPILERS, LIBRARIES OR COMPILER AND LOADER OPTIONS
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
You can specify a compiler and/or compile and load time flags by using
environment variables during configuration. For example, if you want
to use a specific compiler, specify the CC environment variable before
running configure:
env CC=gcc ../dist/configure
Using anything other than the native compiler will almost certainly
mean that you'll want to check the compile and load line flags, too.
To specify debugging and optimization options for the C compiler,
use the CFLAGS environment variable:
env CFLAGS=-O2 ../dist/configure
To specify header file search directories and other miscellaneous options
for the C preprocessor and compiler, use the CPPFLAGS environment variable:
env CPPFLAGS=-I/usr/contrib/include ../dist/configure
To specify debugging and optimization options for the C++ compiler,
use the CXXFLAGS environment variable:
env CXXFLAGS=-Woverloaded-virtual ../dist/configure
To specify miscellaneous options for the linker, use the LDFLAGS
environment variable:
env LDFLAGS="-N32" ../dist/configure
If the Tcl or any other include files or libraries are in non-standard
places on your system, you will need to specify the directory path where
they can be found.
If you want to specify additional libraries and library directories, set
the LIBS environment variable before running configure. For example:
env LIBS="-L/a/b -L/e/f -lposix" ../dist/configure
would specify two additional directories to search for libraries, /a/b
and /e/f, and one additional library to load, "posix".
Make sure that you prepend -L to any library directory names and that you
prepend -I to any include file directory names! Also, make sure that you
quote the arguments as shown above, i.e. with single or double quotes
around the values you're specifying for LIBS, if they contain blank or
tab characters.
The env command is available on most systems, and simply sets one or more
environment variables before running a command. If the env command is
not available to you, you can set the environment variables in your shell
before running configure. For example, in sh or ksh, you could do:
LIBS="-L/a/b -L/e/f -ldb" ../dist/configure
and in csh or tcsh, you could do:
setenv LIBS "-L/a/b -L/e/f -ldb"
../dist/configure
See your shell's manual page for further information.
=-=-=-=-=-=-=
INSTALLING DB
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
DB installs the following files into the following locations, with the
following default values:
Variables: Default value:
prefix /usr/local
exec_prefix $(prefix)
includedir $(prefix)/include
bindir $(prefix)/bin
libdir $(prefix)/lib
mandir $(prefix)/man
File(s): Default location
----------------------------------------
db.h, db_185.h $(includedir)
libdb.a $(libdir)
utilities $(bindir)
formatted man pages $(mandir)/cat1/
formatted man pages $(mandir)/cat3/
Unformatted man pages are not installed by default.
To move the entire installation tree somewhere besides /usr/local, change
the value "prefix". To move the binaries to a different place, change
the value of "bindir". Similarly, to move the man pages to a different
location, change the value of "mandir". These values can be changed as
part of configuration:
../dist/configure --prefix=/usr/contrib
or when doing the install itself:
make prefix=/usr/contrib install
Note, the installation process will attempt to create any directories
that are not already in place on the system.