diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2014-03-24 08:27:19 -0300 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2014-03-24 08:30:24 -0300 |
commit | fac4d091b1bc2f941ce83df865752d3d0ec990e3 (patch) | |
tree | 6e8647bf71b1e8986c210f2b250c78da948253e4 /configure.ac | |
parent | 749263253286b175db765953999c513966b40094 (diff) | |
download | kmod-python.tar.gz |
build-sys: add hooks to build python bindingspython
Add --enable-python configure switch so we build the python bindings. We
also pass version.py through SED_PROCESS macro, so the version is kept
in sync with kmod.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e95942a..18d6e5f 100644 --- a/configure.ac +++ b/configure.ac @@ -127,6 +127,24 @@ AS_IF([test "x$enable_debug" = "xyes"], [ AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.]) ]) +AC_ARG_ENABLE([python], + AS_HELP_STRING([--enable-python], [enable Python libkmod bindings @<:@default=disabled@:>@]), + [], [enable_python=no]) +AS_IF([test "x$enable_python" = "xyes"], [ + AM_PATH_PYTHON(,,[:]) + AC_PATH_PROG([CYTHON], [cython], [:]) + + PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}], + [have_python=yes], + [PKG_CHECK_MODULES([PYTHON], [python], + [have_python=yes], + [have_python=no])]) + + AS_IF([test "x$have_python" = xno], + [AC_MSG_ERROR([*** python support requested but libraries not found])]) +]) +AM_CONDITIONAL([BUILD_PYTHON], [test "x$enable_python" = "xyes"]) + m4_ifdef([GTK_DOC_CHECK], [ GTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat]) ], [ @@ -222,6 +240,7 @@ AC_MSG_RESULT([ ldflags: ${with_ldflags} ${LDFLAGS} tools: ${enable_tools} + python bindings: ${enable_python} logging: ${enable_logging} compression: xz=${with_xz} zlib=${with_zlib} debug: ${enable_debug} |