diff options
author | Michal Privoznik <mprivozn@redhat.com> | 2022-11-01 10:52:12 +0100 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2023-04-03 14:52:07 -0400 |
commit | 37889ffab861ff8538e4c5ff66d24709023de645 (patch) | |
tree | e8c923e501723624324b95212819c93c3dd2b35a | |
parent | 5aceb9d68a14e055c7a702483d612b537244e276 (diff) | |
download | libseccomp-37889ffab861ff8538e4c5ff66d24709023de645.tar.gz |
configure.ac: Rework cython detection slightly
Detecting cython version runs cython needlessly many times (one
for AS_ECHO(), one for major and one for minor version
extraction). Speaking of AS_ECHO(), the argument needs escaping
as it's not a single shell word.
Instead of fixing the escaping, let's rework the check a bit so
that cython is executed just once and AS_ECHO() is then replaced
with AC_MSG_CHECKING() AC_MSG_RESULT() combo.
The need for escaping can be seen with newer autotools-2.71.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
-rw-r--r-- | configure.ac | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 3e87734..dfe3db0 100644 --- a/configure.ac +++ b/configure.ac @@ -95,9 +95,11 @@ dnl cython checks dnl #### 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); + AC_MSG_CHECKING([cython version]) + CYTHON_VER_FULL=$(cython -V 2>&1 | cut -d' ' -f 3); + CYTHON_VER_MAJ=$(echo $CYTHON_VER_FULL | cut -d'.' -f 1); + CYTHON_VER_MIN=$(echo $CYTHON_VER_FULL | cut -d'.' -f 2); + AC_MSG_RESULT([$CYTHON_VER_FULL]) ],[ CYTHON_VER_MAJ=0 CYTHON_VER_MIN=0 |