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