summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am5
-rw-r--r--configure.ac3
-rw-r--r--rules/rules.d/60-persistent-input.rules2
3 files changed, 10 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index df426f72a4..eb8f6d197d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -221,6 +221,7 @@ dist_udevrules_DATA += \
extras/rule_generator/75-cd-aliases-generator.rules \
extras/rule_generator/75-persistent-net-generator.rules
+if ENABLE_EXTRAS
# ------------------------------------------------------------------------------
# firmware - firmware loading
# ------------------------------------------------------------------------------
@@ -312,10 +313,14 @@ libexec_PROGRAMS += extras/usb_id/usb_id
# ------------------------------------------------------------------------------
# v4l_id - video4linux capabilities
# ------------------------------------------------------------------------------
+if HAVE_V4L1
extras_v4l_id_v4l_id_SOURCES = extras/v4l_id/v4l_id.c
extras_v4l_id_v4l_id_LDADD = libudev/libudev-private.la
libexec_PROGRAMS += extras/v4l_id/v4l_id
dist_udevrules_DATA += extras/v4l_id/60-persistent-v4l.rules
+endif
+
+endif # ENABLE_EXTRAS
# ------------------------------------------------------------------------------
# qemu -- qemu/kvm guest tweaks
diff --git a/configure.ac b/configure.ac
index b5754f2ac2..caeb741319 100644
--- a/configure.ac
+++ b/configure.ac
@@ -118,6 +118,9 @@ if test "x$enable_extras" = xyes; then
fi
AM_CONDITIONAL([ENABLE_EXTRAS], [test "x$enable_extras" = xyes])
+AC_CHECK_HEADER([linux/videodev.h], [have_videodev_h=yes], [])
+AM_CONDITIONAL(HAVE_V4L1, [test "x$have_videodev_h" = "xyes"])
+
AC_ARG_ENABLE([introspection],
AS_HELP_STRING([--disable-introspection], [disable GObject introspection]),
[], [enable_introspection=yes])
diff --git a/rules/rules.d/60-persistent-input.rules b/rules/rules.d/60-persistent-input.rules
index 634c4dbeaf..db0eda79e8 100644
--- a/rules/rules.d/60-persistent-input.rules
+++ b/rules/rules.d/60-persistent-input.rules
@@ -21,7 +21,9 @@ ENV{.INPUT_CLASS}=="?*", ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial"
# by-id links
KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{.INPUT_CLASS}"
+KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="?*", ATTRS{bInterfaceNumber}!="00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$attr{bInterfaceNumber}-$env{.INPUT_CLASS}"
KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{.INPUT_CLASS}"
+KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="?*", ATTRS{bInterfaceNumber}!="00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$attr{bInterfaceNumber}-event-$env{.INPUT_CLASS}"
# allow empty class for USB devices, by appending the interface number
SUBSYSTEMS=="usb", ENV{ID_BUS}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="", ATTRS{bInterfaceNumber}=="?*", \
SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-if$attr{bInterfaceNumber}"