From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Tue, 15 Apr 2014 11:24:42 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Message-ID: <20140415092442.GK5969@pengutronix.de> References: <1397553565-1144-1-git-send-email-alex.aring@gmail.com> <1397553565-1144-3-git-send-email-alex.aring@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1397553565-1144-3-git-send-email-alex.aring@gmail.com> Subject: Re: [ptxdist] [PATCH v2 2/3] configure.ac: add check for python 2.x version Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: Alexander Aring On Tue, Apr 15, 2014 at 11:19:24AM +0200, Alexander Aring wrote: > Signed-off-by: Alexander Aring > --- > configure.ac | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > = > diff --git a/configure.ac b/configure.ac > index 2a97944..efc67ba 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 I thought you wanted to do s/python/Python/ ? > +dnl > +AC_MSG_CHECKING([check for python major version]) ditto > +PYTHON_MAJOR_VERSION=3D`$PYTHON -c "import sys; print(sys.version_info[[= 0]])" 2> /dev/null` > +case "$PYTHON_MAJOR_VERSION" in > +2) ;; > +*) AC_MSG_ERROR([we need python version 2.x but found $PYTHON_MAJOR_VE= RSION.x]) ;; ditto -- = Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | http://www.pengutronix.de/ | -- = ptxdist mailing list ptxdist@pengutronix.de