diff --git a/configure.ac b/configure.ac index af73bed..df64f3b 100644 --- a/configure.ac +++ b/configure.ac @@ -97,6 +97,11 @@ AS_IF([test "x$enable_gcov" != "xno"], ], ) +AM_PATH_PYTHON() +AC_SUBST(PYTHON) +AS_IF([$($PYTHON -c "import argparse")], [:], + AC_MSG_ERROR([python argparse module is missing])) + AM_CONDITIONAL([GCOV_ENABLED], [test "x$enable_gcov" != "xno"]) AC_SUBST([GCOV_CFLAGS]) AC_SUBST([GCOV_LDFLAGS]) diff --git a/libevdev/Makefile.am b/libevdev/Makefile.am index 552df70..94f5514 100644 --- a/libevdev/Makefile.am +++ b/libevdev/Makefile.am @@ -21,7 +21,7 @@ libevdevincludedir = $(includedir)/libevdev-1.0/libevdev libevdevinclude_HEADERS = libevdev.h libevdev-uinput.h event-names.h: Makefile make-event-names.py - $(srcdir)/make-event-names.py --output=c > $@ + $(PYTHON) $(srcdir)/make-event-names.py --output=c > $@ EXTRA_DIST = make-event-names.py CLEANFILES = event-names.h