[6.0] cd7b69af4 Prefer Python 3 tools

Reza Naghibi reza at naghibi.com
Tue Apr 20 18:27:06 UTC 2021


commit cd7b69af4ef0cbd531e872fc64774f25915868db
Author: Klemens Nanni <kn at openbsd.org>
Date:   Tue May 14 17:43:57 2019 +0200

    Prefer Python 3 tools
    
    The last three commits already made configure recommend installing
    Python 3 packages and look for versioned executables, however with a low
    priority.
    
    This is a problem on systems such as OpenBSD 6.5 with a default Python
    version at 2.7, where 3.7 flavored Python packages get installed with
    a "-3" binary suffix.  That is, when both rst2man and rst2man-3 are
    installed at configure time, the lower version will be picked unless
    explicitly passed through `--with-feature' arguments.
    
    Regardless of this specific case, trying more specificly versioned tool
    names first seems correctly in line with recent development and less
    error prone, so change it accordingly.
    
     Conflicts:
            configure.ac

diff --git a/configure.ac b/configure.ac
index 0954bf389..a3d28c733 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,7 +41,7 @@ AC_ARG_WITH([rst2man],
   AS_HELP_STRING([--with-rst2man=PATH], [Location of rst2man (auto)]),
   [RST2MAN="$withval"],
   AC_CHECK_PROGS(RST2MAN,
-    [rst2man rst2man.py rst2man-3.6 rst2man-3],
+    [rst2man-3.6 rst2man-3 rst2man rst2man.py],
     [no]))
 if test "x$RST2MAN" = "xno"; then
   AC_MSG_ERROR(
@@ -52,7 +52,7 @@ AC_ARG_WITH([sphinx-build],
   AS_HELP_STRING([--with-sphinx-build=PATH], [Location of sphinx-build (auto)]),
   [SPHINX="$withval"],
   AC_CHECK_PROGS(SPHINX,
-    [sphinx-build sphinx-build-3.6 sphinx-build-3],
+    [sphinx-build-3.6 sphinx-build-3 sphinx-build],
     [no]))
 if test "x$SPHINX" = "xno"; then
   AC_MSG_ERROR(
@@ -60,14 +60,16 @@ if test "x$SPHINX" = "xno"; then
 fi
 
 AC_ARG_WITH([rst2html],
-               AS_HELP_STRING([--with-rst2html=PATH],
-                              [Location of rst2html (auto)]),
-               [RST2HTML="$withval"],
-               [AC_CHECK_PROGS(RST2HTML, [rst2html rst2html.py], "no")
-	        if test "x$RST2HTML" = "xno"; then
-		   AC_MSG_WARN([rst2html not found - not building changelog])
-		fi])
+  AS_HELP_STRING([--with-rst2html=PATH], [Location of rst2html (auto)]),
+  [RST2HTML="$withval"],
+  AC_CHECK_PROGS(RST2HTML,
+     [rst2html-3.6 rst2html-3 rst2html rst2html.py],
+     "no"))
 AM_CONDITIONAL(HAVE_RST2HTML,[test "x$RST2HTML" != "xno"])
+if test "x$RST2HTML" = "xno"; then
+   AC_MSG_ERROR(
+     [rst2html not found - (Weird, we found rst2man?!)])
+fi
 
 AC_ARG_WITH([dot],
   AS_HELP_STRING([--with-dot=PATH],


More information about the varnish-commit mailing list