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

Building Berkeley DB XML Libraries for UNIX/POSIX

The buildall.sh script is a wrapper around separate build procedures for each third-party library. If there are problems using the script, or if it is necessary to build libraries individually, it is possible to build manually. Building manually gives you finer control over configuration, build and installation. If you are able to build successfully using buildall.sh, the information on this page is not necessary.

Building Individual Libraries

These instructions assume that the third-party libraries are in the directory, dbxml-2.5.16. They apply regardless of actual location.


Berkeley DB Xerces XQilla

To build multiple UNIX versions of XQilla in the same source tree, create a new directory at the same level as the build directory, and then configure and build in that directory as described previously.


Configuring and building Berkeley DB XML

The --with-berkeleydb, --with-xerces, and --with-xqilla configuration options can be used to specify the location of the install trees. Alternatively, the CFLAGS, LDFLAGS and other standard environment variables can be used to specify the location of the already installed include and library files.

To do a standard UNIX build of Berkeley DB XML using default paths and installations of the third-party libraries, change to the build_unix directory and then enter the following two commands, adjusting the paths as necessary:

cd dbxml-2.5.16/dbxml/build_unix
../dist/configure
make

If you have changed the locations where Berkeley DB, Xerces, or XQilla are installed from the defaults, add the arguments --with-berkeleydb=/path/to/db, --with-xqilla=/path/to/xqilla and/or --with-xerces=/path/to/xerces to configure.

By default, Berkeley DB XML is installed in /usr/local/BerkeleyDBXML.2.5. To change that, add --prefix=/path/to/install to configure. To install the Berkeley DB XML library, enter the following command:

make install

To rebuild Berkeley DB XML, enter:

make clean
make

If you change your mind about how Berkeley DB XML is to be configured, you must start from scratch by entering the following command:

make distclean
../dist/configure
make

To build multiple UNIX versions of Berkeley DB XML in the same source tree, create a new directory at the same level as the build_unix directory, and then configure and build in that directory as described previously.

Building the Java API

To build the DB XML Java API, make sure there is a working javac in your PATH, and specify --enable-java when running both the Berkeley DB and Berkeley DB XML configure scripts. When you run make, the Java support library for Berkeley DB XML will be built, creating the file dbxml.jar in your build directory. By default -source 1.5 and -target 1.5 are passed to javac to build dbxml.jar and dbxmlexamples.jar. If another target is desired it is possible to modify the file dist/Makefile.defs.in where these flags are set.

To make use of the DB XML Java API set your environment variable CLASSPATH to include the full pathname of the dbxml.jar file, as well as the db.jar file from Berkeley DB, and your environment variable LD_LIBRARY_PATH (or equivalent) to include the .libs subdirectory of your build directory.


PrevRefNext

Copyright (c) 1996-2009 Oracle. All rights reserved.