###

Berkeley DB Reference Guide:
  Building Berkeley DB for UNIX/POSIX systems

### Building a small memory footprint library

There are a set of configuration options to assist you in building a small memory footprint library. These configuration options turn off specific functionality in the Berkeley DB library, reducing the code size. These configuration options include:

--disable-cryptography
  To build Berkeley DB without support for cryptography, enter --disable-cryptography as an argument to configure.
--disable-hash
  To build Berkeley DB without support for the Hash access method, enter --disable-hash as an argument to configure.
--disable-queue
  To build Berkeley DB without support for the Queue access method, enter --disable-queue as an argument to configure.
--disable-replication
  To build Berkeley DB without support for the database environment replication, enter --disable-replication as an argument to configure.
--disable-statistics
  To build Berkeley DB without support for the statistics interfaces, enter --disable-statistics as an argument to configure.
--disable-verify
  To build Berkeley DB without support for database verification, enter --disable-verify as an argument to configure.
--enable-smallbuild
  Equivalent to individually specifying --disable-cryptography, --disable-hash, --disable-queue, --disable-replication, --disable-statistics and --disable-verify

The following configuration options will increase the size of the Berkeley DB library dramatically and are only useful when debugging applications:

--enable-debug
  Build Berkeley DB with symbols for debugging.
--enable-debug_rop
  Build Berkeley DB with read-operation logging.
--enable-debug_wop
  Build Berkeley DB with write-operation logging.
--enable-diagnostic
  Build Berkeley DB with run-time debugging checks.

In addition, static libraries are usually smaller than shared libraries. By default Berkeley DB will build both shared and static libraries. To build only a static library, configure Berkeley DB with the --disable-shared option.

The size of the Berkeley DB library varies a lot depending on the compiler, machine architecture, and configuration options. As an estimate, production Berkeley DB libraries built with current GNU gcc compilers have footprints in the range of 400KB to 790KB on 32-bit x86 architectures, and in the range of 490KB to 920KB on 64-bit x86 architectures.

For assistance in further reducing the size of the Berkeley DB library, or in building small memory footprint libraries on other systems, please contact Berkeley DB support.

Copyright (c) 1996-2006 Oracle Corporation - All rights reserved.