build+ci: support CentOS Stream 9 and macOS/arm64
This commit also syncs the CI config and scripts with ndn-tools
Change-Id: I54707a7119c5e91138eaf55ad72af8fa98125028
diff --git a/wscript b/wscript
index ad201d1..3b1a38d 100644
--- a/wscript
+++ b/wscript
@@ -15,6 +15,11 @@
conf.load(['compiler_cxx', 'gnu_dirs',
'default-compiler-flags'])
+ # Prefer pkgconf if it's installed, because it gives more correct results
+ # on Fedora/CentOS/RHEL/etc. See https://bugzilla.redhat.com/show_bug.cgi?id=1953348
+ # Store the result in env.PKGCONFIG, which is the variable used inside check_cfg()
+ conf.find_program(['pkgconf', 'pkg-config'], var='PKGCONFIG')
+
pkg_config_path = os.environ.get('PKG_CONFIG_PATH', f'{conf.env.LIBDIR}/pkgconfig')
conf.check_cfg(package='libndn-cxx', args=['libndn-cxx >= 0.8.0', '--cflags', '--libs'],
uselib_store='NDN_CXX', pkg_config_path=pkg_config_path)