diff options
author | hasufell <hasufell@posteo.de> | 2013-08-27 10:59:03 +0200 |
---|---|---|
committer | hasufell <hasufell@posteo.de> | 2013-08-27 10:59:03 +0200 |
commit | d13046614e84b5261901dfa81e5b60f5eeaf659d (patch) | |
tree | eddbc59afaa6cd9d70732e6cb89cef73e1331fc8 /configure.ac | |
parent | 0c4e343b46dfe9867b46a1876c0a7b851294d60e (diff) |
BUILD: use a blacklist rather than a whitelist for python versions
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 1fd39dcb..75f885e4 100644 --- a/configure.ac +++ b/configure.ac @@ -116,7 +116,7 @@ AC_ARG_ENABLE(xlib, xlib=$enableval, xlib=yes) AC_ARG_ENABLE(python, - [AS_HELP_STRING([--enable-python=pythonversion],[build the python plugin; possible values: python2, python2.7, python3, python3.3 (default on, python2)])], + [AS_HELP_STRING([--enable-python=pythonversion],[build the python plugin; possible values: "python2", "python3" or specific such as "python3.3" (default on, python2)])], python=$enableval, python=python2) AS_IF([test "x$python" = "xyes"], [python=python2]) @@ -338,14 +338,23 @@ dnl ********************************************************************* if test "x$python" != xno ; then case $python in - python2|python2.7) + dnl set python2 default here + python2) PKG_CHECK_MODULES([PY], [python-2.7], [], [AC_MSG_ERROR(Cannot find python-2.7!)]) PY_VER="`$PKG_CONFIG --modversion python-2.7`";; - python3|python3.3) + dnl set python3 default here + python3) PKG_CHECK_MODULES([PY], [python-3.3], [], [AC_MSG_ERROR(Cannot find python-3.3!)]) PY_VER="`$PKG_CONFIG --modversion python-3.3`";; + dnl add broken versions here + python2.5|python2.6|python3.1|python3.2) + AC_MSG_ERROR(Unsupported Python version ${python}!);; + python*) + python="python-${python#python}" # stay posix compliant + PKG_CHECK_MODULES([PY], [${python}], [], [AC_MSG_ERROR(Cannot find "${python}.pc"!)]) + PY_VER="`$PKG_CONFIG --modversion ${python}`";; *) - AC_MSG_ERROR(Unsupported ${python}. Only python2.7 and python3.3 are currently supported!) + AC_MSG_ERROR(Unsupported Python ${python}!) esac AC_MSG_CHECKING(Python version) AC_MSG_RESULT($PY_VER) |