diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/evdev.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index f62a33e..0f9cb01 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,7 @@ XORG_DEFAULT_OPTIONS # Obtain compiler/linker options from server and required extensions PKG_CHECK_MODULES(XORG, [xorg-server >= 1.18] xproto [inputproto >= 2.1.99.3]) -PKG_CHECK_MODULES(UDEV, libudev) +PKG_CHECK_MODULES(UDEV, libudev, [AC_DEFINE(HAVE_LIBUDEV, 1,[libudev support])]) PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4]) PKG_CHECK_MODULES(MTDEV, mtdev) diff --git a/src/evdev.c b/src/evdev.c index 92fc330..b9555ef 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -39,7 +39,9 @@ #include <X11/extensions/XI.h> #include <sys/stat.h> +#ifdef HAVE_LIBUDEV #include <libudev.h> +#endif #include <unistd.h> #include <errno.h> #include <fcntl.h> @@ -225,6 +227,7 @@ EvdevIsDuplicate(InputInfoPtr pInfo) static BOOL EvdevDeviceIsVirtual(const char* devicenode) { +#ifdef HAVE_LIBUDEV struct udev *udev = NULL; struct udev_device *device = NULL; struct stat st; @@ -255,6 +258,9 @@ out: udev_device_unref(device); udev_unref(udev); return rc; +#else + return FALSE; +#endif } |