diff options
author | Emil Velikov <[email protected]> | 2018-08-16 13:40:21 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2018-08-23 11:55:55 +0100 |
commit | df2042d99ac54f8639f123c8586d9cadcfbb5521 (patch) | |
tree | 88dcaa50159fb8a051c1fa257280c99a3b3e6af2 /configure.ac | |
parent | c7c0b391ef43254f34723e8741370d8ae7048078 (diff) |
configure: enforce python 2.7 with AM_PATH_PYTHON
Currently we use AC_CHECK_PROGS looking for python2.7, python2 and
finally python. That is due to the varying names used across the
different OS.
Use the handy AM_PATH_PYTHON which finds the correct name and checks for
the version.
Note: python2.7 has been an unofficial requirement for quite some time.
Update the docs to reflect that.
Cc: Dylan Baker <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 4d9d9e59280..f8bb131cb63 100644 --- a/configure.ac +++ b/configure.ac @@ -125,7 +125,10 @@ AC_PROG_GREP AC_PROG_NM AM_PROG_AS AX_CHECK_GNU_MAKE -AC_CHECK_PROGS([PYTHON2], [python2.7 python2 python]) +AM_PATH_PYTHON([2.7],, [:]) +PYTHON2=$PYTHON +AC_SUBST([PYTHON2]) + AC_PROG_SED AC_PROG_MKDIR_P @@ -157,7 +160,7 @@ fi AX_CHECK_PYTHON_MAKO_MODULE($PYTHON_MAKO_REQUIRED) -if test -z "$PYTHON2"; then +if test "$PYTHON2" = ":"; then if test ! -f "$srcdir/src/util/format_srgb.c"; then AC_MSG_ERROR([Python not found - unable to generate sources]) fi |