diff options
author | Rene Engelhard <rene@debian.org> | 2012-11-26 22:19:20 +0100 |
---|---|---|
committer | Rene Engelhard <rene@debian.org> | 2012-11-26 22:19:37 +0100 |
commit | 7af306fb2508f01b91749542fd383acc0e675e34 (patch) | |
tree | 5ff76a88f873b319291f3cc6c49ce85c3a82ea89 /configure.ac | |
parent | 5781a5ea3d502332cda77ab75aa7ddd1c9ca36f7 (diff) |
check for python >= 3.3 in configure when building with python3
Change-Id: If25d4d1d583caace32934d7a7230bb86330cfbed
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 68cb5bcdf3df..572ec999f37a 100644 --- a/configure.ac +++ b/configure.ac @@ -7448,6 +7448,20 @@ system) []) CPPFLAGS="$save_CPPFLAGS" + AC_LANG_PUSH(C) + CFLAGS="$CFLAGS $PYTHON_CFLAGS" + AC_MSG_CHECKING([for correct python library version]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include <Python.h> + +int main(int argc, char **argv) { + if (PY_MAJOR_VERSION < 3 || (PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3)) return 0; + else return 1; +} + ]])],[AC_MSG_RESULT([ok])],[AC_MSG_ERROR([Python >= 3.3 is needed when building with Python 3])],[]) + CFLAGS=$save_CFLAGS + AC_LANG_POP(C) + dnl FIXME Check if the Python library can be linked with, too? ;; |