summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac17
-rw-r--r--tools/Makefile.am1
3 files changed, 6 insertions, 15 deletions
diff --git a/Makefile.am b/Makefile.am
index f1ad5af..ce2d86c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,7 +19,8 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Ensure xorg.conf.d snippets are installed below $(prefix) for distcheck
-DISTCHECK_CONFIGURE_FLAGS = --with-xorg-conf-dir='$${datadir}/X11/xorg.conf.d'
+DISTCHECK_CONFIGURE_FLAGS = --with-xorg-conf-dir='$${datadir}/X11/xorg.conf.d' \
+ --with-udev-rules-dir='$${libdir}/udev/rules.d'
SUBDIRS = shared src tools fdi man
MAINTAINERCLEANFILES = ChangeLog INSTALL
diff --git a/configure.ac b/configure.ac
index d2fb0b6..2e1e021 100644
--- a/configure.ac
+++ b/configure.ac
@@ -92,19 +92,10 @@ 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
+
+PKG_CHECK_MODULES(UDEV, udev,
+ [UDEV_RULES_DIR="`$PKG_CONFIG --variable=udevdir udev`/rules.d"],
+ [UDEV_RULES_DIR=no])
AC_ARG_WITH(udev-rules-dir,
AC_HELP_STRING([--with-udev-rules-dir=DIR],
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 23493cd..ea7ba66 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -43,7 +43,6 @@ dist_conf_DATA = 50-vmmouse.conf
endif
if HAS_UDEV_RULES_DIR
-
udevdir=$(UDEV_RULES_DIR)
udev_DATA = 69-xorg-vmmouse.rules