diff options
author | Joseph Myers <joseph@codesourcery.com> | 2018-10-29 15:28:05 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2018-10-29 15:28:05 +0000 |
commit | c6982f7efc1c70fe2d6160a87ee44d871ac85ab0 (patch) | |
tree | 1b1badfdc9453d1d32ca0bd207501253f7de92d5 /configure.ac | |
parent | 5c81be53407434ce22b849722a3d691295480016 (diff) | |
download | glibc-c6982f7efc1c70fe2d6160a87ee44d871ac85ab0.tar.gz |
Patch to require Python 3.4 or later to build glibc.
This patch makes Python 3.4 or later a required tool for building
glibc, so allowing changes of awk, perl etc. code used in the build
and test to Python code without any such changes needing makefile
conditionals or to handle older Python versions.
This patch makes the configure test for Python check the version and
give an error if Python is missing or too old, and removes makefile
conditionals that are no longer needed. It does not itself convert
any code from another language to Python, and does not remove any
compatibility with older Python versions from existing scripts.
Tested for x86_64.
* configure.ac (PYTHON_PROG): Use AC_CHECK_PROG_VER. Set
critic_missing for versions before 3.4.
* configure: Regenerated.
* manual/install.texi (Tools for Compilation): Document
requirement for Python to build glibc.
* INSTALL: Regenerated.
* Rules [PYTHON]: Make code unconditional.
* benchtests/Makefile [PYTHON]: Likewise.
* conform/Makefile [PYTHON]: Likewise.
* manual/Makefile [PYTHON]: Likewise.
* math/Makefile [PYTHON]: Likewise.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index e983fd8faa..6cc10ede98 100644 --- a/configure.ac +++ b/configure.ac @@ -1050,18 +1050,12 @@ else fi # Check for python3 if available, or else python. -AC_CHECK_PROGS(PYTHON_PROG, python3 python,no) -case "x$PYTHON_PROG" in -xno|x|x:) PYTHON_PROG=no ;; -*) ;; -esac - -if test "x$PYTHON_PROG" = xno; then - aux_missing="$aux_missing python" -else - PYTHON="$PYTHON_PROG -B" - AC_SUBST(PYTHON) -fi +AC_CHECK_PROG_VER(PYTHON_PROG, python3 python, --version, + [Python \([0-9][0-9.]*\)], + [3.[4-9]*|3.[1-9][0-9]*|[4-9].*|[1-9][0-9]*], + critic_missing="$critic_missing python") +PYTHON="$PYTHON_PROG -B" +AC_SUBST(PYTHON) test -n "$critic_missing" && AC_MSG_ERROR([ *** These critical programs are missing or too old:$critic_missing |