Cython is necessary to compile if --enable-python is used.
Currently, the configuration just sets Cython to ':' if
it isn't found. ':' is a valid command which results in
confusing build errors:

  CCLD     libkmod/libkmod.la
  CCLD     libkmod/libkmod-internal.la
ar: `u' modifier ignored since `D' is the default (see `U')
  CYTHON  libkmod/python/kmod/kmod.c
  CC       libkmod/python/kmod/libkmod_python_kmod_kmod_la-kmod.lo
gcc: error: ./libkmod/python/kmod/kmod.c: No such file or directory
gcc: fatal error: no input files

Explicitly check if cython is available and then error out
if it isn't found.
---
 configure.ac | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index d4f84bd..1648a17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -162,7 +162,10 @@ AC_ARG_ENABLE([python],
        [], [enable_python=no])
 AS_IF([test "x$enable_python" = "xyes"], [
        AM_PATH_PYTHON(,,[:])
-       AC_PATH_PROG([CYTHON], [cython], [:])
+       AC_PATH_PROG([CYTHON], [cython], [no])
+       if test x"$CYTHON" == x"no"; then
+               AC_MSG_ERROR([Please install Cython before building])
+       fi
 
        PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}],
                          [have_python=yes],
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to