summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-04-20 15:26:20 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2014-04-21 10:45:10 +0200
commit9bba0e7d525dc8829cf3cfda1d0988fe26524d88 (patch)
tree6ad55020a2005bc0836f54e89fcbb6f602d1ce6c /configure.ac
parent0a38210dad3d89ee081cd621c96b5fde39e53fa9 (diff)
downloadptxdist-9bba0e7d525dc8829cf3cfda1d0988fe26524d88.tar.gz
ptxdist-9bba0e7d525dc8829cf3cfda1d0988fe26524d88.tar.xz
configure.ac: add check for python 2.x version
Signed-off-by: Alexander Aring <alex.aring@gmail.com> [mol: change check message] Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 2a9794422..8cae510bc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -304,6 +304,18 @@ AC_ARG_WITH(python, AS_HELP_STRING([--with-python],[name of the python executabl
AC_PATH_PROGS(PYTHON, python2.7 python2.6 python)
AC_SUBST(PYTHON)
])
+
+dnl
+dnl Check for Python 2.x
+dnl
+AC_MSG_CHECKING([Python version])
+PYTHON_VERSION=`$PYTHON --version 2>&1 | $SED -ne "1 s/Python \([[0-9\+\.]]\+\).*/\1/p"`
+case "$PYTHON_VERSION" in
+2.*) ;;
+*) AC_MSG_ERROR([we need Python version 2.x but found $PYTHON_VERSION]) ;;
+esac
+AC_MSG_RESULT([$PYTHON_VERSION])
+
dnl
dnl We need the Python distutils
dnl