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 <dylan@pnwbakers.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
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
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
<ul>
<li><a href="https://www.python.org/">Python</a> - Python is required.
-Version 2.6.4 or later should work.
+Version 2.7 or later should work.
</li>
<li><a href="http://www.makotemplates.org/">Python Mako module</a> -
Python Mako module is required. Version 0.3.4 or later should work.