Checking for an include file that requires another include file

Ralph Böhme rb at sernet.de
Sat Jan 3 14:28:09 MST 2015


On Sat, Jan 03, 2015 at 11:09:20AM -0800, Richard Sharpe wrote:
> Hi,
> 
> I am working on the Zookeeper registry backend and want to check for
> the existence of a Zookeeper include file, zookeeper_log.h, that
> requires zookeeper itself.
> 
> This requires that -I/usr/local/include/zookeper be passed to CHECK_HEADERS.
> 
> How do I do that?

Can you use pkg_config for the zookeeper check?

You need something like this:

    if Options.options.with_zookeeper:
        conf.check_cfg(package='zookeeper', args='--cflags --libs',
                       msg='Checking for zookeeper', uselib_store="ZOOKEEPER")
        conf.CHECK_HEADERS('zookeeper_log.h', lib='zookeeper')

Cf source3/wscript, l. 1511 where we solve the same problem for glusterfs.

Hth!
-Ralph

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de,mailto:kontakt@sernet.de


More information about the samba-technical mailing list