diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a1f9383..1f4548c 100644 --- a/configure.ac +++ b/configure.ac @@ -50,6 +50,11 @@ AM_PATH_PYTHON([2.6]) AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)]) +# This command exits 0 (success) if sys.version >= "3", or 1 (failure) +# if sys.version < "3" (i.e. starts with "2"). +AM_CONDITIONAL([HAVE_PYTHON_3], + [$PYTHON -c "import sys; sys.exit(sys.version < '3')"]) + PLATFORM=`$PYTHON -c "from __future__ import print_function; from distutils import util; print(util.get_platform())"` AC_SUBST(PLATFORM) |