apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: Autoconf question: conditional compile
Date Wed, 08 Aug 2001 22:42:45 GMT
On Wed, Aug 08, 2001 at 10:12:34PM +0200, Graham Leggett wrote:
> Justin Erenkrantz wrote:
> 
> > I think you'd want:
> > 
> > #include <apu.h>
> > ...
> > #if APU_HAS_LDAP
> > /* LDAP code here. */
> > #else
> > /* You don't have LDAP, so don't do anything. */
> > #endif
> > 
> > The trick is that APU_HAS_LDAP should be a 0 or 1 value not a simple
> > define.  And, I think rbb (or Doug?) pointed out that it should be
> > APR_HAS_LDAP since that symbol doesn't conflict with APR.
> 
> Would it be a good idea to use the AC_CONFIG_HEADER(include/apr_ldap.h)
> macro for this?
> 
> Can this macro be used more than once? (it is used already in
> configure.in for include/private/apu_config.h)

In apu.h.in, you can add:

#define APU_HAS_LDAP @ldap@

That's how I see it anyway.  This mimics the apr.h.in feature macros.
ldap would be 0 or 1 depending upon if you found LDAP libraries.

(rbb says to use APU, so use APU...)  -- justin


Mime
View raw message