2
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
4
<!--See the file LICENSE for redistribution information.-->
7
<title>Berkeley DB Reference Guide: Configuring Berkeley DB</title>
8
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
9
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
12
<a name="2"><!--meow--></a><a name="3"><!--meow--></a>
13
<table width="100%"><tr valign=top>
14
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Building Berkeley DB for UNIX systems</dl></h3></td>
15
<td align=right><a href="../../ref/build_unix/intro.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/build_unix/flags.html"><img src="../../images/next.gif" alt="Next"></a>
18
<h1 align=center>Configuring Berkeley DB</h1>
19
<p>There are several arguments you can specify when configuring Berkeley DB.
20
Although only the Berkeley DB-specific ones are described here, most of the
21
standard GNU autoconf arguments are available and supported. To see a
22
complete list of possible arguments, specify the --help flag to the
24
<p>The Berkeley DB specific arguments are as follows:
26
<a name="4"><!--meow--></a>
27
<p><dt><a name="--enable-compat185">--enable-compat185</a><dd>To compile or load Berkeley DB 1.85 applications against this release of the
28
Berkeley DB library, enter --enable-compat185 as an argument to configure.
29
This will include Berkeley DB 1.85 API compatibility code in the library.
30
<a name="5"><!--meow--></a>
31
<p><dt><a name="--enable-cxx">--enable-cxx</a><dd>To build the Berkeley DB C++ API, enter --enable-cxx as an argument to
33
<p><dt><a name="--enable-debug">--enable-debug</a><dd>To build Berkeley DB with <b>-g</b> as a compiler flag and with
34
<b>DEBUG</b> #defined during compilation, enter --enable-debug as an
35
argument to configure. This will create a Berkeley DB library and utilities
36
with debugging symbols, as well as load various routines that can be
37
called from a debugger to display pages, cursor queues, and so forth.
38
If installed, the utilities will not be stripped. This argument should
39
not be specified when configuring to build production binaries.
40
<p><dt><a name="--enable-debug_rop">--enable-debug_rop</a><dd>To build Berkeley DB to output log records for read operations, enter
41
--enable-debug_rop as an argument to configure. This argument should not
42
be specified when configuring to build production binaries.
43
<p><dt><a name="--enable-debug_wop">--enable-debug_wop</a><dd>To build Berkeley DB to output log records for write operations, enter
44
--enable-debug_wop as an argument to configure. This argument should not
45
be specified when configuring to build production binaries.
46
<p><dt><a name="--enable-diagnostic">--enable-diagnostic</a><dd>To build Berkeley DB with run-time debugging checks, enter --enable-diagnostic
47
as an argument to configure. This will cause a number of special checks
48
to be performed when Berkeley DB is running. Applications built using this
49
argument should not share database environments with applications built
50
without this argument. This argument should not be specified when
51
configuring to build production binaries.
52
<a name="6"><!--meow--></a>
53
<p><dt><a name="--enable-dump185">--enable-dump185</a><dd>To convert Berkeley DB 1.85 (or earlier) databases to this release of Berkeley DB,
54
enter --enable-dump185 as an argument to configure. This will build the
55
<a href="../../utility/db_dump.html">db_dump185</a> utility, which can dump Berkeley DB 1.85 and 1.86 databases
56
in a format readable by the Berkeley DB <a href="../../utility/db_load.html">db_load</a> utility.
57
<p>The system libraries with which you are loading the <a href="../../utility/db_dump.html">db_dump185</a>
58
utility must already contain the Berkeley DB 1.85 library routines for this
59
to work because the Berkeley DB distribution does not include them. If you
60
are using a non-standard library for the Berkeley DB 1.85 library routines,
61
you will have to change the Makefile that the configuration step creates
62
to load the <a href="../../utility/db_dump.html">db_dump185</a> utility with that library.
63
<a name="7"><!--meow--></a>
64
<p><dt><a name="--enable-java">--enable-java</a><dd>To build the Berkeley DB Java API, enter --enable-java as an argument to
65
configure. To build Java, you must also build with shared libraries.
66
Before configuring, you must set your PATH environment variable to
67
include javac. Note that it is not sufficient to include a symbolic
68
link to javac in your PATH because the configuration process uses the
69
location of javac to determine the location of the Java include files
70
(for example, jni.h). On some systems, additional include directories
71
may be needed to process jni.h; see <a href="flags.html">Changing compile or
72
load options</a> for more information.
73
<a name="8"><!--meow--></a>
74
<p><dt><a name="--disable-largefile">--disable-largefile</a><dd>Some systems, notably versions of HP/UX and Solaris, require special
75
compile-time options in order to create files larger than 2^32 bytes.
76
These options are automatically enabled when Berkeley DB is compiled. For
77
this reason, binaries built on current versions of these systems may
78
not run on earlier versions of the system because the library and system
79
calls necessary for large files are not available. To disable building
80
with these compile-time options, enter --disable-largefile as an argument
82
<p><dt><a name="--enable-posixmutexes">--enable-posixmutexes</a><dd>To force Berkeley DB to use the POSIX pthread mutex interfaces for underlying
83
mutex support, enter --enable-posixmutexes as an argument to configure.
84
This is rarely necessary: POSIX mutexes will be selected automatically
85
on systems where they are the preferred implementation.
86
<p>The --enable-posixmutexes configuration argument is normally used in
87
two ways: First, when there are multiple mutex implementations available
88
and the POSIX mutex implementation is not the preferred one (for
89
example, on Solaris where the LWP mutexes are used by default). Second,
90
by default the Berkeley DB library will only select the POSIX mutex
91
implementation if it supports mutexes shared between multiple processes,
92
as described for the pthread_condattr_setpshared and
93
pthread_mutexattr_setpshared interfaces. The --enable-posixmutexes
94
configuration argument can be used to force the selection of POSIX
95
mutexes in this case, which can improve application performance
96
significantly when the alternative mutex implementation is a
97
non-blocking one (for example test-and-set assembly instructions).
98
However, configuring to use POSIX mutexes when the implementation does
99
not have inter-process support will only allow the creation of private
100
database environments, that is, environments where the
101
<a href="../../api_c/env_open.html#DB_PRIVATE">DB_PRIVATE</a> flag is specified to the <a href="../../api_c/env_open.html">DB_ENV->open</a> method.
102
<p>Specifying the --enable-posixmutexes configuration argument may require
103
that Berkeley DB be linked with the -lpthread library.
104
<a name="9"><!--meow--></a>
105
<p><dt><a name="--enable-rpc">--enable-rpc</a><dd>To build the Berkeley DB RPC client code and server utility, enter --enable-rpc
106
as an argument to configure. The --enable-rpc argument requires that RPC
107
libraries already be installed on your system.
108
<a name="10"><!--meow--></a><a name="11"><!--meow--></a>
109
<p><dt><a name="--disable-shared">--disable-shared</a>, <a name="--disable-static">--disable-static</a><dd>On systems supporting shared libraries, Berkeley DB builds both static and
110
shared libraries by default. (Shared libraries are built using
111
<a href="http://www.gnu.org/software/libtool/libtool.html">the GNU
112
Project's Libtool</a> distribution, which supports shared library builds
113
on many (although not all) systems.) To not build shared libraries,
114
configure using the --disable-shared argument. To not build static
115
libraries, configure using the --disable-static argument.
116
<a name="12"><!--meow--></a>
117
<p><dt><a name="--enable-tcl">--enable-tcl</a><dd>To build the Berkeley DB Tcl API, enter --enable-tcl as an argument to
118
configure. This configuration argument expects to find Tcl's tclConfig.sh
119
file in the <b>/usr/local/lib</b> directory. See the --with-tcl
120
argument for instructions on specifying a non-standard location for the
121
Tcl installation. See <a href="../../ref/tcl/intro.html">Loading Berkeley DB
122
with Tcl</a> for information on sites from which you can download Tcl and
123
which Tcl versions are compatible with Berkeley DB. To build Tcl, you must
124
also build with shared libraries.
125
<a name="13"><!--meow--></a>
126
<p><dt><a name="--enable-test">--enable-test</a><dd>To build the Berkeley DB test suite, enter --enable-test as an argument to
127
configure. To run the Berkeley DB test suite, you must also build the Tcl
128
API. This argument should not be specified when configuring to build
130
<p><dt><a name="--enable-uimutexes">--enable-uimutexes</a><dd>To force Berkeley DB to use the UNIX International (UI) mutex interfaces for
131
underlying mutex support, enter --enable-uimutexes as an argument to
132
configure. This is rarely necessary: UI mutexes will be selected
133
automatically on systems where they are the preferred implementation.
134
<p>The --enable-uimutexes configuration argument is normally used when
135
there are multiple mutex implementations available and the UI mutex
136
implementation is not the preferred one (for example, on Solaris where
137
the LWP mutexes are used by default).
138
<p>Specifying the --enable-uimutexes configuration argument may require
139
that Berkeley DB be linked with the -lthread library.
140
<p><dt><a name="--enable-umrw">--enable-umrw</a><dd>Rational Software's Purify product and other run-time tools complain
141
about uninitialized reads/writes of structure fields whose only purpose
142
is padding, as well as when heap memory that was never initialized is
143
written to disk. Specify the --enable-umrw argument during
144
configuration to mask these errors. This argument should not be
145
specified when configuring to build production binaries.
146
<p><dt><a name="--with-embedix=DIR">--with-embedix=DIR</a><dd>To build Berkeley DB for Embedix, configure with --with-embedix=DIR, where
147
DIR is the directory in which Embedix is installed. If "=DIR" is not
148
specified, a default installation directory of <b>/opt/Embedix</b> is
149
used. This configuration argument creates an Embedix Component Descriptor
150
file (ECD) for Berkeley DB. To configure for Embedix, you must also specify
151
the --with-rpm argument.
152
<p><dt><a name="--with-mutex=MUTEX">--with-mutex=MUTEX</a><dd>To force Berkeley DB to use a specific mutex implementation, configure with
153
--with-mutex=MUTEX, where MUTEX is the mutex implementation you want.
154
For example, --with-mutex=x86/gcc-assembly will configure Berkeley DB to use
155
the x86 GNU gcc compiler based test-and-set assembly mutexes. This is
156
rarely necessary and should be done only when the default configuration
157
selects the wrong mutex implementation. A list of available mutex
158
implementations can be found in the distribution file
159
<b>dist/aclocal/mutex.ac</b>.
160
<p><dt><a name="--with-rpm=DIR">--with-rpm=DIR</a><dd>To build Berkeley DB as an RPM software package, configure with --with-rpm=DIR,
161
where DIR is the directory in which the gzipped tar archive file of the
162
distribution may be found. This configuration argument will create an
163
RPM specification file from which the RPM software package can be built,
164
using the "make" command.
165
<p><dt><a name="--with-tcl=DIR">--with-tcl=DIR</a><dd>To build the Berkeley DB Tcl API, enter --with-tcl=DIR, replacing DIR with
166
the directory in which the Tcl tclConfig.sh file may be found. See
167
<a href="../../ref/tcl/intro.html">Loading Berkeley DB with Tcl</a> for information
168
on sites from which you can download Tcl and which Tcl versions are
169
compatible with Berkeley DB. To build Tcl, you must also build with shared
171
<p><dt><a name="--with-uniquename=NAME">--with-uniquename=NAME</a><dd>To build Berkeley DB with unique symbol names (in order to avoid conflicts
172
with other application modules or libraries), enter --with-uniquename=NAME,
173
replacing NAME with a string that to be appended to every Berkeley DB symbol.
174
If "=NAME" is not specified, a default value of "_MAJORMINOR" is used,
175
where MAJORMINOR is the major and minor release numbers of the Berkeley DB
176
release. See <a href="../../ref/install/multiple.html">Building with
177
multiple versions of Berkeley DB</a> for more information.
179
<table width="100%"><tr><td><br></td><td align=right><a href="../../ref/build_unix/intro.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/build_unix/flags.html"><img src="../../images/next.gif" alt="Next"></a>
181
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>