[Date Prev][Date Next] [Chronological] [Thread] [Top]

portable.h contents in back-monitor (Was: [Fwd: commit: ldap/servers/slapd/back-monitor...)

[posted to -devel for discussion]

> Pierangelo Masarati wrote:

>> On a slightly related note, I don't know if it's worth, but
>> I'd like to have a means to know how slapd (and OpenLDAP) was compiled;
>> something like:
>>         slapd --tell-me-the-defines-in-portable-h
>> To make it the broadest usable, I'd like to:
>> - put that info in back-monitor, so that it's available via protocol
>> - add (read) tool methods to back monitor, so that it can be slapdcat'd,
>> and used, for example to know if slapo-xxx was actually built, without
>> resorting to nm or starting slapd.
> Hm, I haven't looked at how other projects do this, but I would imagine
> it's something added to portable.h itself, perhaps an autoheader option.
> There's so many macros in portable.h this would be a huge bit of output
> to read.

I recall sendmail used to allow presenting the config macros; but even
without looking at other projects I was thinking of something like an
OL_DEFINE(_UNQUOTED) macro that calls AC_DEFINE(_UNQUOTED) plus some
echoing of the macro's name, value and comment to another file, where
things are registered as entries in a three-string array; not too
different from what we already do for backends and overlays.  I haven't
though of details yet, like values that are not just booleans.  Then it
would just be a matter of s/AC_DEFINE/OL_DEFINE/g.

On an unrelated note, talking about backends and overlays, I think their
configuration should be further streamlined, so that a couple of lines,
maybe just a OL_{BACKEND,OVERLAY}_ENABLE, does all the rest.  Even things
like extra objects (like in rwm) and consistency checks could be added as
optional args to that macro.  This is because we often get requests for
custom overlays that are statically builtin, and this requires changes to
configure.in a bit intrusive.  I'll play a bit with this.


Ing. Pierangelo Masarati
Responsabile Open Solution
OpenLDAP Core Team

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it