.7Berkeley DB: Building for UNIX platforms
1

Berkeley DB: Building for UNIX platforms

CBuilding Berkeley DB on a UNIX platform
@Berkeley DB's configuration options
VChanging compilers, libraries or compiler and loader options
1Installing Berkeley DB

5

Building Berkeley DB on a UNIX platform:



@To perform the default build of Berkeley DB, first change to theGbuild_unix directory, and then enter the following two commands:

	../dist/configure	make
(This will build the Berkeley DB library.*To install the Berkeley DB library, enter:

	make install


JSee below for specific information on what files are installed and in whatEdirectories, and how to configure installation on a per-system basis.

!If you want to rebuild DB, enter:

	make clean	make


KIf you change your mind about how Berkeley DB is configured, you must startfrom scratch by entering:

	make distclean	../dist/configure	make


PTo build multiple UNIX versions of Berkeley DB in the same source tree, create aLnew directory at the same level as build_unix, and then configure and build.

	mkdir build_bsdos3.0	cd build_bsdos3.0	../dist/configure	make


KJava support cannot be built using the configuration options. To configureIand build the Java API, see the file db/java/README for more information.

HIf you have trouble with any of these commands, please send email to theGaddresses found in the Sleepycat Software contact information. In thatJemail, please provide a complete copy of the commands that you entered and their output.


1

Berkeley DB's configuration options:



GThere are many options that you can enter to the configuration program,Lonly a few of which are Berkeley DB specific. To see a complete list of the/options, enter ../dist/configure --help.

0The Berkeley DB specific options are as follows:

--enable-cxx:



--enable-debug:



--enable-diagnostic:



--enable-compat185:



--enable-dump185:



--enable-test:



--disable-bigfile:


J

Changing compilers, libraries or compiler and loader options:



FYou can specify a compiler and/or compile and load time flags by usingEenvironment variables during configuration. For example, if you wantFto use a specific compiler, specify the CC environment variable beforerunning configure:





CUsing anything other than the native compiler will almost certainlyDmean that you'll want to check the compile and load line flags, too.

ATo specify debugging and optimization options for the C compiler,$use the CFLAGS environment variable:





ITo specify header file search directories and other miscellaneous optionsKfor the C preprocessor and compiler, use the CPPFLAGS environment variable:





CTo specify debugging and optimization options for the C++ compiler,&use the CXXFLAGS environment variable:





@To specify miscellaneous options for the linker, use the LDFLAGSenvironment variable:





FIf the Tcl or any other include files or libraries are in non-standardHplaces on your system, you will need to specify the directory path wherethey can be found.

HIf you want to specify additional libraries and library directories, setEthe LIBS environment variable before running configure. For example:





Fwould specify two additional directories to search for libraries, /a/b6and /e/f, and one additional library to load, "posix".

IMake sure that you prepend -L to any library directory names and that youIprepend -I to any include file directory names! Also, make sure that youEquote the arguments as shown above, i.e. with single or double quotesFaround the values you're specifying for LIBS, if they contain blank ortab characters.

IThe env command is available on most systems, and simply sets one or moreFenvironment variables before running a command. If the env command isInot available to you, you can set the environment variables in your shellCbefore running configure. For example, in sh or ksh, you could do:e

t

f

I!and in csh or tcsh, you could do:d

o

s

5See your shell's manual page for further information.o


r$

Installing Berkeley DB:



bFBerkeley DB installs the following files into the following locations,"with the following default values:

a a " l  p " t & s " l # l e  "  , r e s w t r  u 
VariablesDefault value
prefix/usr/local
bindir$(prefix)/BerkeleyDB/bin
includedir$(prefix)/BerkeleyDB/include
libdir$(prefix)/BerkeleyDB/lib
mandir$(prefix)/BerkeleyDB/docs
File(s)Default location
db.h, db_cxx.h, db_185.h$(includedir)
libdb.a$(libdir)
utilities$(bindir)
documentation$(mandir)


o9To move the entire installation tree to somewhere besidesbB/usr/local, change the value of prefix. To move theFbinaries to a different place, change the value of bindir. TheCvalues of includedir, libdir and mandir may beuIsimilarly changed. These values can be changed as part of configuration:u

o

s

t!or when doing the install itself:a

o



JNote, the installation process will attempt to create any directories that#do not already exist on the system.m ˙˙und in the Sleepycat Software contact information. In thatJemail, please provide a complete copy of the commands that you entered and their output.