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-26 22:30:56 -0300 |
commit | 3a33a7a566c221e13c426c0d2f3519ebe8f70a34 (patch) | |
tree | 95c461f52f94f6a694847d20494e3f41b5d2f5bd /configure.ac | |
parent | 5ad36e522226732d3815ace77b2ec19198bd24fc (diff) | |
download | kmod-3a33a7a566c221e13c426c0d2f3519ebe8f70a34.tar.gz |
build-sys: add hooks to build python bindings
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.
Acked-by: Andy Grover <agrover@redhat.com>
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 f2070c6..b195296 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} |