1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>
Autoconf Macro: ax_path_bdb
</title>
<link rel="stylesheet" type="text/css" href="autoconf-archive.css">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<table summary="web navigation" style="width:100%;">
<tbody>
<tr>
<td style="width:33%;" align="center" valign="top">
<a href="macros-by-category.html">Macros by Category</a>
</td>
<td style="width:33%;" align="center" valign="top">
<a href=
"http://git.cryp.to/autoconf-archive/history/master:/ax_path_bdb.m4">Revision
History</a>
</td>
<td style="width:33%;" align="center" valign="top">
<form method="get" action="http://www.google.com/search">
<div>
<input name="sitesearch" value="autoconf-archive.cryp.to" type=
"hidden">Search: <input name="q" maxlength="255" type="text">
</div>
</form>
</td>
</tr>
</tbody>
</table>
<hr>
<h1>
ax_path_bdb
</h1>
<h2>
SYNOPSIS
</h2>
<p class="indent" style="white-space:nowrap;">
<code>AX_PATH_BDB([MINIMUM-VERSION], [ACTION-IF-FOUND],
[ACTION-IF-NOT-FOUND])</code>
</p>
<h2>
DESCRIPTION
</h2>
<div class="indent">
<p>
This macro finds the latest version of Berkeley DB on the system, and
ensures that the header file and library versions match. If MINIMUM-VERSION
is specified, it will ensure that the library found is at least that
version.
</p>
<p>
It determines the name of the library as well as the path to the header
file and library. It will check both the default environment as well as the
default Berkeley DB install location. When found, it sets BDB_LIBS,
BDB_CPPFLAGS, and BDB_LDFLAGS to the necessary values to add to LIBS,
CPPFLAGS, and LDFLAGS, as well as setting BDB_VERSION to the version found.
HAVE_DB_H is defined also.
</p>
<p>
The option --with-bdb-dir=DIR can be used to specify a specific Berkeley DB
installation to use.
</p>
<p>
An example of it's use is:
</p>
<pre>
AX_PATH_BDB([3],[
LIBS="$BDB_LIBS $LIBS"
LDFLAGS="$BDB_LDFLAGS $LDFLAGS"
CPPFLAGS="$CPPFLAGS $BDB_CPPFLAGS"
])
</pre>
<p>
which will locate the latest version of Berkeley DB on the system, and
ensure that it is version 3.0 or higher.
</p>
<p>
Details: This macro does not use either AC_CHECK_HEADERS or AC_CHECK_LIB
because, first, the functions inside the library are sometimes renamed to
contain a version code that is only available from the db.h on the system,
and second, because it is common to have multiple db.h and libdb files on a
system it is important to make sure the ones being used correspond to the
same version. Additionally, there are many different possible names for
libdb when installed by an OS distribution, and these need to be checked if
db.h does not correspond to libdb.
</p>
<p>
When cross compiling, only header versions are verified since it would be
difficult to check the library version. Additionally the default Berkeley
DB installation locations /usr/local/BerkeleyDB* are not searched for
higher versions of the library.
</p>
<p>
The format for the list of library names to search came from the Cyrus IMAP
distribution, although they are generated dynamically here, and only for
the version found in db.h.
</p>
<p>
The macro <a href="ax_compare_version.html">AX_COMPARE_VERSION</a> is
required to use this macro, and should be available from the Autoconf Macro
Archive.
</p>
<p>
The author would like to acknowledge the generous and valuable feedback
from Guido Draheim, without which this macro would be far less robust, and
have poor and inconsistent cross compilation support.
</p>
<p>
Changes:
</p>
<pre>
1/5/05 applied patch from Rafa Rzepecki to eliminate compiler
warning about unused variable, argv
</pre>
</div>
<h2>
SOURCE CODE
</h2>
<p class="indent">
<a href=
"http://autoconf-archive.cryp.to/ax_path_bdb.m4">http://autoconf-archive.cryp.to/ax_path_bdb.m4</a>
</p>
<h2>
LICENSE
</h2>
<div class="indent">
<p style="white-space:nowrap;">
Copyright © 2008 Tim Toolan <toolan@ele.uri.edu>
</p>
<p>
Copying and distribution of this file, with or without modification, are
permitted in any medium without royalty provided the copyright notice and
this notice are preserved.
</p>
</div>
</body>
</html>
|