Checking for an include file that requires another include file
rb at sernet.de
Mon Jan 5 06:48:14 MST 2015
On Sat, Jan 03, 2015 at 01:44:13PM -0800, Richard Sharpe wrote:
> On Sat, Jan 3, 2015 at 1:28 PM, Ralph Böhme <rb at sernet.de> wrote:
> > 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.
> Unfortunately, Zookeeper does not have a pkg_config ... will have to
> look for another way.
have you considered something like this?
conf.env['CPPPATH_ZOOKEEPER'] = Options.options.zookeeper_dir + '/include'
conf.env['LIBPATH_ZOOKEEPER'] = Options.options.zookeeper_dir + '/lib'
Not tested, just adopted from the cephfs test in source3/wscript.
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
More information about the samba-technical