[PATCH evemu v2 3/4] configure.ac: add '--disable-python-bindings' option
Peter Seiderer
ps.report at gmx.net
Mon Aug 11 13:26:09 PDT 2014
Needed for target systems without python support.
Signed-off-by: Peter Seiderer <ps.report at gmx.net>
---
Changes v1 -> v2:
- use BUILD_PYTHON_BINDINGS conditional (as suggested by Peter Hutterer)
---
configure.ac | 10 ++++++++++
python/Makefile.am | 2 ++
python/evemu/Makefile.am | 3 +++
3 files changed, 15 insertions(+)
diff --git a/configure.ac b/configure.ac
index 372a5ec..cc6d786 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,16 @@ if test "x$XMLTO" = "x" || test "x$ASCIIDOC" = "x"; then
AC_MSG_WARN([xmlto or asciidoc not found - cannot create man pages without it])
fi
+AC_ARG_ENABLE([python-bindings],
+ AS_HELP_STRING([--disable-python-bindings], [disable generation of python bindings]),
+ [case "${enableval}" in
+ yes) python_bindings=true ;;
+ no) python_bindings=false ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --disable-python-bindings]) ;;
+ esac],[python_bindings=true])
+
+AM_CONDITIONAL(BUILD_PYTHON_BINDINGS, [test "x$python_bindings" = "xtrue"])
+
AC_ARG_ENABLE([tests],
AS_HELP_STRING([--disable-tests], [disable building of tests]),
[case "${enableval}" in
diff --git a/python/Makefile.am b/python/Makefile.am
index a31ee98..b1bca19 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -18,8 +18,10 @@
SUBDIRS = evemu
+if BUILD_PYTHON_BINDINGS
nobase_python_PYTHON = \
$(wildcard evemu/*.py)
+endif
if BUILD_TESTS
check_SCRIPTS = evemu-test-runner
diff --git a/python/evemu/Makefile.am b/python/evemu/Makefile.am
index 17b1462..e252635 100644
--- a/python/evemu/Makefile.am
+++ b/python/evemu/Makefile.am
@@ -1,6 +1,9 @@
+if BUILD_PYTHON_BINDINGS
event_names.py: Makefile make-event-names.py
$(PYTHON) $(srcdir)/make-event-names.py > $@
BUILT_SOURCES = event_names.py
+endif
+
CLEANFILES = event_names.py event_names.pyc
EXTRA_DIST = make-event-names.py
--
1.8.1.4
More information about the Input-tools
mailing list