From 80f671233e583ae085986bce12057fc45da444aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 1 Apr 2010 18:35:38 +0200 Subject: Add InputClass support. The InputClass can match the tag "vmmouse". A sample xorg.conf.d snippet is provided to try and make sure the driver will be loaded automatically in a compatible VM also if the X server uses udev instead of HAL. The configure script tries to determine if and where it makes sense to install the udev rule and xorg.conf.d snippet but allows overriding both. Thanks to Timo Aaltonen for the udev rules file and Dan Nicholson and Simon Thum for review and suggestions for improvement. --- configure.ac | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index e39fcbb..7623b98 100644 --- a/configure.ac +++ b/configure.ac @@ -59,6 +59,14 @@ AC_ARG_WITH(xorg-module-dir, inputdir=${moduledir}/input AC_SUBST(inputdir) +AC_ARG_WITH(xorg-conf-dir, + AC_HELP_STRING([--with-xorg-conf-dir=DIR], + [Default xorg.conf.d directory [[default=from $PKG_CONFIG xorg-server]]]), + [XORG_CONF_DIR="$withval"], + [XORG_CONF_DIR="`$PKG_CONFIG --variable=sysconfigdir xorg-server`"]) +AC_SUBST(XORG_CONF_DIR) +AM_CONDITIONAL(HAS_XORG_CONF_DIR, [test "x$XORG_CONF_DIR" != "x" && test "x$XORG_CONF_DIR" != "xno"]) + AC_ARG_WITH(hal-bin-dir, AC_HELP_STRING([--with-hal-bin-dir=DIR], [Directory where HAL binaries where installed [[default=$bindir]]]), @@ -85,6 +93,29 @@ AC_ARG_WITH(hal-fdi-dir, HAL_FDI_DIR=${halfdidir} AC_SUBST(HAL_FDI_DIR) +case $host_os in + linux*) + if test "x$prefix" = "xNONE" -o "x$prefix" = "x/usr" -o "x$prefix" = "x/usr/local" ; then + slashlibdir=/lib + else + slashlibdir=$prefix/lib + fi + UDEV_RULES_DIR=$slashlibdir/udev/rules.d + ;; + *) + UDEV_RULES_DIR=no + ;; +esac + +AC_ARG_WITH(udev-rules-dir, + AC_HELP_STRING([--with-udev-rules-dir=DIR], + [Default udev rules.d directory + [[default=($prefix)/lib/udev/rules.d on Linux, none otherwise]]]), + [UDEV_RULES_DIR="$withval"], + []) +AC_SUBST(UDEV_RULES_DIR) +AM_CONDITIONAL(HAS_UDEV_RULES_DIR, [test "x$UDEV_RULES_DIR" != "xno"]) + # Checks for extensions XORG_DRIVER_CHECK_EXT(RANDR, randrproto) XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) -- cgit v1.2.3