From: Paul Brossier Date: Mon, 27 Dec 2021 03:07:02 +0000 (-0500) Subject: [waf] also check for hdf5 directly X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=a2b11590820386e6dc298f91d539f75dae0d6d4c;p=aubio.git [waf] also check for hdf5 directly current brew does not ship libdhf5.pc --- diff --git a/wscript b/wscript index 71ea095c..8287989f 100644 --- a/wscript +++ b/wscript @@ -524,10 +524,16 @@ def configure(ctx): ctx.define('HAVE_MEMCPY_HACKS', 1) if (ctx.options.enable_hdf5 != False): + # try with pkg-config ctx.check_cfg(package='hdf5', args='--cflags --libs', + uselib_store='HDF5', mandatory=False) + # also try directly + ctx.check(lib=['hdf5'], use = ['HDF5'], uselib_store='HDF5', mandatory=ctx.options.enable_hdf5) ctx.check(lib=['hdf5_hl'], use = ['HDF5'], uselib_store='HDF5_HL', mandatory=ctx.options.enable_hdf5) + if 'LIB_HDF5_HL' in ctx.env and 'LIB_HDF5' in ctx.env: + ctx.define('HAVE_HDF5', 1) # write configuration header ctx.write_config_header('src/config.h')