On Tue, Jan 17, 2012 at 11:40:25AM -0500, Wietse Venema wrote:
> No problem. This is a three-line change in sys_defs.h and two lines
> of documentation in makedefs.  There probably needs to be some
> documentation in DB_README.html as well.

Thank you.  I also needed this 2 line patch:

--- a/src/global/mail_params.c
+++ b/src/global/mail_params.c
@@ -175,6 +175,8 @@
 #include <mymalloc.h>
 #ifdef HAS_DB
 #include <dict_db.h>
+#else
+#include <dict.h>
 #endif
 #include <inet_proto.h>
 #include <vstring_vstream.h>

to avoid:
[...]
gcc -Wmissing-prototypes -Wformat -DNO_DB -DHAS_PCRE -DSNAPSHOT -g -O
-I. -I../../include -DLINUX3 -c mail_params.c
mail_params.c: In function 'mail_params_init':
mail_params.c:662:2: error: 'dict_allow_surrogate' undeclared (first use
in this function)
mail_params.c:662:2: note: each undeclared identifier is reported only
once for each function it appears in
make: *** [mail_params.o] Error 1
make: *** [update] Error 1


Perhaps this is adequate for documentation:

--- a/proto/DB_README.html
+++ b/proto/DB_README.html
@@ -33,7 +33,10 @@ before 2.0.  </p>
 
 <ol>
 
-<li> <p> How to build Postfix on <a href="#no_db">systems without
+<li> <p> How to build Postfix <a href="#no_db">without
+Berkeley DB library</a>. </p>
+
+<li> <p> How to build Postfix <a href="#with_db">with
 Berkeley DB library</a>. </p>
 
 <li> <p> How to build Postfix on <a href="#bsd">BSD</a> or <a
@@ -46,7 +49,24 @@ versions.  </p>
 
 </ol>
 
-<h2><a name="no_db">Building Postfix on systems without Berkeley
+<h2><a name="no_db">Building Postfix without Berkeley
+DB</a></h2>
+
+<p> To build Postfix without Berkeley DB support, use something 
+like: </p>
+
+<blockquote>
+<pre>
+% make tidy
+% make makefiles CCARGS="-DNO_DB"
+% make
+</pre>
+</blockquote>
+
+<p> Warning: without Berkeley DB, postfix will not be able to use 
+hash or btree lookup table types.</p>
+
+<h2><a name="with_db">Building Postfix with Berkeley
 DB</a></h2>
 
 <p> Some UNIXes ship without Berkeley DB support; for historical
--- a/proto/INSTALL.html
+++ b/proto/INSTALL.html
@@ -372,6 +372,10 @@ Specifies non-default compiler arguments, for example, a 
non-default
 <tt>include</tt> directory.  The following directives turn
 off Postfix features at compile time:</td> </tr>
 
+<tr> <td> </td> <td> -DNO_DB </td> <td> Do not build with Berkeley
+DB support. By default, Berkeley DB support is compiled in on platforms
+that are known to support this feature.  </td> </tr>
+
 <tr> <td> </td> <td> -DNO_DEVPOLL </td> <td> Do not build with
 Solaris <tt>/dev/poll</tt> support. By default, <tt>/dev/poll</tt>
 support is compiled in on Solaris versions that are known to support


-- 
Eray Aslan

Reply via email to