apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Max Bowsher" <m...@ukf.net>
Subject Re: autoconf help: enable a feature based on the string value of a #define
Date Thu, 06 Jan 2005 12:00:34 GMT
Joe Orton wrote:
> On Thu, Jan 06, 2005 at 10:40:25AM +0200, Graham Leggett wrote:
>> Hi all,
>>
>> The LDAP C API defines the LDAP_VENDOR_NAME symbol to identify the
>> toolkit. This symbol contains a string, such as "OpenLDAP" or "Novell".
>>
>> I would like autoconf to define APR_HAS_OPENLDAP_SDK if this #define
>> contains the string "OpenLDAP", and I have not been able to figure out 
>> how
>> to do it.
>>
>> Has anybody solved this problem before?
>
> something like:
>
> AC_EGREP_CPP(OpenLDAP, [#include <ldap.h>
> LDAP_VENDOR_NAME])
>
> wrapped in AC_CACHE_CHECK as normal, should work.

Yes - I recently had to do this in Subversion:

http://svn.collab.net/repos/svn/trunk/build/ac-macros/swig.m4

search for "Python/C" to find the relevant place.

Max.


Mime
View raw message