From: Jason Ish Date: Tue, 5 Sep 2023 21:16:43 +0000 (-0600) Subject: configure: more idiomatic autoconf for sphinx-build checks X-Git-Tag: suricata-7.0.1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae3b1a9e36dc57e72eff7ca3d4e4d1441d36335f;p=thirdparty%2Fsuricata.git configure: more idiomatic autoconf for sphinx-build checks - Use SPHINX_BUILD instead of HAVE_SPHINX_BUILD, as here we're actually using the path of the program. - Wrap some elements in [] as is done in modern idiomatic autoconf --- diff --git a/configure.ac b/configure.ac index 7437704649..72adef1b91 100644 --- a/configure.ac +++ b/configure.ac @@ -2230,29 +2230,29 @@ fi fi # 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 + AC_PATH_PROG([SPHINX_BUILD], [sphinx-build], [no]) + if test "$SPHINX_BUILD" != "no"; then MIN_SPHINX_BUILD_VERSION="3.4.3" - sphinx_build_version=$($HAVE_SPHINXBUILD --version 2>&1 | cut -d' ' -f2-) + sphinx_build_version=$($SPHINX_BUILD --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" + SPHINX_BUILD="no" ], [], []) - if test "$HAVE_SPHINXBUILD" != "no"; then - AC_MSG_RESULT(yes) + if test "$SPHINX_BUILD" != "no"; then + AC_MSG_RESULT([yes]) fi fi - if test "$HAVE_SPHINXBUILD" = "no"; then + if test "$SPHINX_BUILD" = "no"; then enable_sphinxbuild=no if test -e "$srcdir/doc/userguide/suricata.1"; then have_suricata_man=yes fi fi - AM_CONDITIONAL([HAVE_SPHINXBUILD], [test "x$enable_sphinxbuild" != "xno"]) + AM_CONDITIONAL([SPHINX_BUILD], [test "x$enable_sphinxbuild" != "xno"]) AM_CONDITIONAL([HAVE_SURICATA_MAN], [test "x$have_suricata_man" = "xyes"]) # pdflatex for the pdf version of the user manual diff --git a/doc/userguide/Makefile.am b/doc/userguide/Makefile.am index 8fcfa86177..bd157920cf 100644 --- a/doc/userguide/Makefile.am +++ b/doc/userguide/Makefile.am @@ -37,7 +37,7 @@ if HAVE_SURICATA_MAN dist_man1_MANS = suricata.1 suricatasc.1 suricatactl.1 suricatactl-filestore.1 endif -if HAVE_SPHINXBUILD +if SPHINX_BUILD dist_man1_MANS = suricata.1 suricatasc.1 suricatactl.1 suricatactl-filestore.1 if HAVE_PDFLATEX @@ -92,4 +92,4 @@ clean-local: rm -f $(top_builddir)/doc/userguide/suricata*.1 rm -f $(top_builddir)/doc/userguide/userguide.pdf -endif # HAVE_SPHINXBUILD +endif # SPHINX_BUILD