summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2019-11-13 20:54:25 -0500
committerPaul Moore <paul@paul-moore.com>2019-11-19 14:50:42 -0500
commitc7d80edd4a452db4685fee530f36933cd00358fa (patch)
treeb53e3a291aa37d7795e221f58a405dfe13e4af5d /configure.ac
parent1052ec1cc15be55f679f0d93496226f247d179b4 (diff)
downloadlibseccomp-c7d80edd4a452db4685fee530f36933cd00358fa.tar.gz
build: try to use explicitly marked Python 3.x tools first
Python 2.x is going EOL very soon, so let's require Python 3.x now and attempt to use the explicitly marked Python 3.x tools first. Signed-off-by: Paul Moore <paul@paul-moore.com> Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 6 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 2ae6b2d..7d80b40 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,11 +91,11 @@ AC_SUBST([VERSION_MICRO])
dnl ####
dnl cython checks
dnl ####
-AC_CHECK_PROG(have_cython, cython, "yes", "no")
-AS_IF([test "$have_cython" = yes], [
- AS_ECHO("checking cython version... $(cython -V 2>&1 | cut -d' ' -f 3)")
- CYTHON_VER_MAJ=$(cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 1);
- CYTHON_VER_MIN=$(cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 2);
+AC_CHECK_PROGS(cython, cython3 cython, "no")
+AS_IF([test "$cython" != no], [
+ AS_ECHO("checking cython version... $($cython -V 2>&1 | cut -d' ' -f 3)")
+ CYTHON_VER_MAJ=$($cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 1);
+ CYTHON_VER_MIN=$($cython -V 2>&1 | cut -d' ' -f 3 | cut -d'.' -f 2);
],[
CYTHON_VER_MAJ=0
CYTHON_VER_MIN=0
@@ -112,7 +112,7 @@ AS_IF([test "$enable_python" = yes], [
AS_IF([test "$CYTHON_VER_MAJ" -eq 0 -a "$CYTHON_VER_MIN" -lt 29], [
AC_MSG_ERROR([python bindings require cython 0.29 or higher])
])
- AM_PATH_PYTHON
+ AM_PATH_PYTHON([3])
])
AM_CONDITIONAL([ENABLE_PYTHON], [test "$enable_python" = yes])
AC_DEFINE_UNQUOTED([ENABLE_PYTHON],