From 82758fb09f8035c0a723332813831d87037559ed Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Tue, 5 Sep 2023 15:06:24 -0600 Subject: [PATCH] configure: check for new enough sphinx-build We need a recent version of Sphinx to build the documentation in 7.0. Check for a minimum version of 3.4.3. If older, do not build the docs which is the same behavior when sphinx-build is not found. Bug: #6297 --- configure.ac | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 1fba3ebeef..7437704649 100644 --- a/configure.ac +++ b/configure.ac @@ -2229,8 +2229,23 @@ fi AC_DEFINE([CLS],[64],[L1 cache line size]) fi -# sphinx for documentation +# sphinx-build for documentation, and also check for a new enough version AC_PATH_PROG(HAVE_SPHINXBUILD, sphinx-build, "no") + if test "$HAVE_SPHINXBUILD" != "no"; then + MIN_SPHINX_BUILD_VERSION="3.4.3" + sphinx_build_version=$($HAVE_SPHINXBUILD --version 2>&1 | cut -d' ' -f2-) + AC_MSG_CHECKING([for sphinx-build >= $MIN_SPHINX_BUILD_VERSION]) + AS_VERSION_COMPARE([$sphinx_build_version], [$MIN_SPHINX_BUILD_VERSION], + [ + AC_MSG_RESULT([no, documentation will not be built]) + HAVE_SPHINXBUILD="no" + ], + [], []) + if test "$HAVE_SPHINXBUILD" != "no"; then + AC_MSG_RESULT(yes) + fi + fi + if test "$HAVE_SPHINXBUILD" = "no"; then enable_sphinxbuild=no if test -e "$srcdir/doc/userguide/suricata.1"; then -- 2.47.2