On Wed, Jun 01, 2005 at 10:09:40PM -0000, [EMAIL PROTECTED] wrote: > Author: pquerna > Date: Wed Jun 1 15:09:39 2005 > New Revision: 179431 > > URL: http://svn.apache.org/viewcvs?rev=179431&view=rev > Log: > - Make lucene4c optional to build mod_mbox. > > Lucene4c is not currently stable, so making it optional makes mod_mbox usable > by other people...
Looks like some other changes snuck into this commit. > Modified: httpd/mod_mbox/trunk/configure.ac > URL: > http://svn.apache.org/viewcvs/httpd/mod_mbox/trunk/configure.ac?rev=179431&r1=179430&r2=179431&view=diff > ============================================================================== > --- httpd/mod_mbox/trunk/configure.ac (original) > +++ httpd/mod_mbox/trunk/configure.ac Wed Jun 1 15:09:39 2005 > @@ -15,7 +15,8 @@ > AC_PROG_LD > AC_PROG_INSTALL > > -CHECK_LUCENE4C > + > +CHECK_LUCENE4C([],[LUCENE4C_CFLAGS="-DNO_MBOX_SEARCH"]) A suggestion would be to rename that to MBOX_NO_SEARCH since most of the defines in mod_mbox are prefixed with MBOX_. Or, perhaps #defining WITH_LUCENE4C as that follows the autoconf-ish standard. But, NO_MBOX_SEARCH seems wrong. > @@ -135,9 +155,33 @@ > return APR_EGENERAL; > } > > + doc_count++; > + if ((doc_count % 50) == 0) { > + err = lcn_index_writer_optimize(ctx->writer); > + if (err) { > + fprintf (stderr, "error optimizing index: %s\n", err->message); > + apr_pool_clear(ctx->tpool); > + return APR_EGENERAL; > + } > + > + err = lcn_index_writer_close(ctx->writer); > + if (err) { > + fprintf (stderr, "error closing index: %s\n", err->message); > + apr_pool_clear(ctx->tpool); > + return APR_EGENERAL; > + } > + > + err = lcn_index_writer_create(&ctx->writer, ctx->path, > ctx->analyzer, ctx->pool); > + if (err) { > + fprintf (stderr, "error opening index: %s\n", err->message); > + apr_pool_clear(ctx->tpool); > + return APR_EGENERAL; > + } > + } > apr_pool_clear(ctx->tpool); > > return APR_SUCCESS; > +#endif > } I don't think this chunk is about an optional Lucene. Since there aren't any comments, I can't even begin to guess what this code does. =) Updating the log as well would be goodness too... -- justin
