Imported Upstream version 5.3.21
[platform/upstream/libdb.git] / docs / installation / install_multiple.html
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4   <head>
5     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6     <title>Building with multiple versions of Berkeley DB</title>
7     <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
8     <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9     <link rel="start" href="index.html" title="Berkeley DB Installation and Build Guide" />
10     <link rel="up" href="install.html" title="Chapter 2.  System Installation Notes" />
11     <link rel="prev" href="install.html" title="Chapter 2.  System Installation Notes" />
12     <link rel="next" href="debug.html" title="Chapter 3.  Debugging Applications" />
13   </head>
14   <body>
15     <div xmlns="" class="navheader">
16       <div class="libver">
17         <p>Library Version 11.2.5.3</p>
18       </div>
19       <table width="100%" summary="Navigation header">
20         <tr>
21           <th colspan="3" align="center">Building with multiple versions of Berkeley DB</th>
22         </tr>
23         <tr>
24           <td width="20%" align="left"><a accesskey="p" href="install.html">Prev</a> </td>
25           <th width="60%" align="center">Chapter 2. 
26                 System Installation Notes
27         </th>
28           <td width="20%" align="right"> <a accesskey="n" href="debug.html">Next</a></td>
29         </tr>
30       </table>
31       <hr />
32     </div>
33     <div class="sect1" lang="en" xml:lang="en">
34       <div class="titlepage">
35         <div>
36           <div>
37             <h2 class="title" style="clear: both"><a id="install_multiple"></a>Building with multiple versions of Berkeley DB</h2>
38           </div>
39         </div>
40       </div>
41       <p>In some cases it may be necessary to build applications which include
42 multiple versions of Berkeley DB.  Examples include applications which include
43 software from other vendors, or applications running on a system where
44 the system C library itself uses Berkeley DB.  In such cases, the two versions
45 of Berkeley DB may be incompatible, that is, they may have different external
46 and internal interfaces, and may even have different underlying database
47 formats.</p>
48       <p>To create a Berkeley DB library whose symbols won't collide with other Berkeley DB
49 libraries (or other application or library modules, for that matter),
50 configure Berkeley DB using the <a class="link" href="build_unix_conf.html#build_unix_conf.--with-uniquename=NAME">--with-uniquename=NAME</a> configuration option,
51 and then build Berkeley DB as usual.  (Note that
52 <a class="link" href="build_unix_conf.html#build_unix_conf.--with-uniquename=NAME">--with-uniquename=NAME</a> only affects the Berkeley DB C language library build;
53 loading multiple versions of the C++ or Java APIs will require
54 additional work.)  The modified symbol names are hidden from the
55 application in the Berkeley DB header files, that is, there is no need for
56 the application to be aware that it is using a special library build as
57 long as it includes the appropriate Berkeley DB header file.</p>
58       <p>If "NAME" is not specified when configuring with
59 <a class="link" href="build_unix_conf.html#build_unix_conf.--with-uniquename=NAME">--with-uniquename=NAME</a>, a default value built from the major and minor
60 numbers of the Berkeley DB release will be used.  It is rarely necessary to
61 specify NAME; using the major and minor release numbers will ensure that
62 only one copy of the library will be loaded into the application unless
63 two distinct versions really are necessary.</p>
64       <p>When distributing any library software that uses Berkeley DB, or any software
65 which will be recompiled by users for their systems, we recommend two
66 things: First, include the Berkeley DB release as part of your release.  This
67 will insulate your software from potential Berkeley DB API changes as well as
68 simplifying your coding because you will only have to code to a single
69 version of the Berkeley DB API instead of adapting at compile time to whatever
70 version of Berkeley DB happens to be installed on the target system.  Second,
71 use <a class="link" href="build_unix_conf.html#build_unix_conf.--with-uniquename=NAME">--with-uniquename=NAME</a> when configuring Berkeley DB, because that will insure that
72 you do not unexpectedly collide with other application code or a library
73 already installed on the target system.</p>
74     </div>
75     <div class="navfooter">
76       <hr />
77       <table width="100%" summary="Navigation footer">
78         <tr>
79           <td width="40%" align="left"><a accesskey="p" href="install.html">Prev</a> </td>
80           <td width="20%" align="center">
81             <a accesskey="u" href="install.html">Up</a>
82           </td>
83           <td width="40%" align="right"> <a accesskey="n" href="debug.html">Next</a></td>
84         </tr>
85         <tr>
86           <td width="40%" align="left" valign="top">Chapter 2. 
87                 System Installation Notes
88          </td>
89           <td width="20%" align="center">
90             <a accesskey="h" href="index.html">Home</a>
91           </td>
92           <td width="40%" align="right" valign="top"> Chapter 3. 
93                 Debugging Applications
94         </td>
95         </tr>
96       </table>
97     </div>
98   </body>
99 </html>