summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2013-04-03 13:23:53 -0400
committerPaul Moore <pmoore@redhat.com>2013-04-03 13:23:53 -0400
commit17ee994f5f1099c1e81c76feba8fb503deb1f6cb (patch)
treea8ad0a34ee754e1f7f0c511adf9e93cfd069972a
parentb9ea299f69a15b237fd5f992dbadad0d6b19f768 (diff)
downloadlibseccomp-17ee994f5f1099c1e81c76feba8fb503deb1f6cb.tar.gz
build: ensure that cython 0.16 or higher is installed when building python bindings
Our Cython code only builds properly on Cython 0.16 or higher so verify that a proper version of Cython is installed if we are building the Python bindings. Signed-off-by: Paul Moore <pmoore@redhat.com>
-rwxr-xr-xconfigure13
1 files changed, 12 insertions, 1 deletions
diff --git a/configure b/configure
index 8866fda..50bdcca 100755
--- a/configure
+++ b/configure
@@ -201,11 +201,15 @@ while [[ $# -gt 0 ]]; do
esac
done
-# validate the options
+#
+# validate the command line options
+#
+
if [[ -e "$opt_prefix" && ! -d "$opt_prefix" ]]; then
msg_error "install prefix ($opt_prefix) is not a directory"
exit 1
fi
+
if [[ -z $opt_libdir ]]; then
opt_libdir="$opt_prefix/lib"
fi
@@ -213,11 +217,18 @@ if [[ -e "$opt_libdir" && ! -d "$opt_libdir" ]]; then
msg_error "libdir ($opt_libdir) is not a directory"
exit 1
fi
+
if [[ "$opt_bindings_python" = "yes" ]]; then
if ! test_deps cython; then
msg_error "python bindings require the cython package"
exit 1
fi
+ cython_ver=$(cython -V 2>&1 | cut -d' ' -f 3)
+ if [[ $(echo $cython_ver | cut -d'.' -f 1) -lt 1 &&
+ $(echo $cython_ver | cut -d'.' -f 2) -lt 16 ]]; then
+ msg_error "python bindings require cython 0.16 or higher"
+ exit 1
+ fi
fi
#