diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-08-05 08:12:15 +1000 |
---|---|---|
committer | Jakob Bornecrantz <jakob@vmware.com> | 2012-08-07 00:55:01 +0200 |
commit | dba73cebb527bb36a3d17d67b1e8e1892852b240 (patch) | |
tree | a7b7aa7b3409cfdef8509ab9071c8eb5c1646219 | |
parent | 3c8ccf5eec3177ed8976ed5ff04795a20287d2d8 (diff) |
Fetch the udev dir from udev.pc instead of guessing based on prefix
Reviewed-by: Gaetan Nadon<memsize@videotron.ca>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | configure.ac | 17 | ||||
-rw-r--r-- | tools/Makefile.am | 1 |
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 |