build: support CentOS Stream 9, make graphviz optional
Change-Id: I5c0d824720f9f701ee2a88774e661c7472baea88
diff --git a/wscript b/wscript
index 42b7a1c..590dda2 100644
--- a/wscript
+++ b/wscript
@@ -25,6 +25,13 @@
conf.env.WITH_TESTS = conf.options.with_tests
+ conf.find_program('dot', mandatory=False)
+
+ # 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)
@@ -99,6 +106,7 @@
target=['docs/doxygen.conf',
'docs/named_data_theme/named_data_footer-with-analytics.html'],
VERSION=VERSION,
+ HAVE_DOT='YES' if bld.env.DOT else 'NO',
HTML_FOOTER='../build/docs/named_data_theme/named_data_footer-with-analytics.html' \
if os.getenv('GOOGLE_ANALYTICS', None) \
else '../docs/named_data_theme/named_data_footer.html',