File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,21 @@ AC_DEFUN([OPAL_SETUP_SPHINX],[
43
43
# version.
44
44
AS_IF([test -n " $SPHINX_BUILD " ],
45
45
[[sphinx_target_version= ` sed -n -e ' s/sphinx[><=]*\([0-9\.]\)/\1/p' $srcdir /docs/requirements.txt` ]
46
- sphinx_found_version=` $SPHINX_BUILD --version 2>&1 | cut -d\ -f2`
46
+ # Some older versions of Sphinx (e.g., Sphinx v1.1.3 in
47
+ # RHEL 7):
48
+ #
49
+ # - Don't support "--version".
50
+ # - But do emit the version number as part of the general
51
+ # CLI help when they don't recognize the --version CLI
52
+ # option.
53
+ #
54
+ # In that case, we only want the first line, and we want to
55
+ # strip off the leading "v" from the version number.
56
+ #
57
+ # In the case where --version *is* recognized, all the
58
+ # additional processing is harmless and we still end up
59
+ # with the Sphinx version number.
60
+ sphinx_found_version=` $SPHINX_BUILD --version 2>&1 | head -n 1 | cut -d\ -f2 | sed -e ' s/^v//' `
47
61
AC_MSG_CHECKING([if Sphinx version is high enough ($sphinx_found_version > = $sphinx_target_version )])
48
62
AS_VERSION_COMPARE([$sphinx_found_version ],
49
63
[$sphinx_target_version ],
You can’t perform that action at this time.
0 commit comments