summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-08-05 08:12:15 +1000
committerJakob Bornecrantz <jakob@vmware.com>2012-08-07 00:55:01 +0200
commitdba73cebb527bb36a3d17d67b1e8e1892852b240 (patch)
treea7b7aa7b3409cfdef8509ab9071c8eb5c1646219 /configure.ac
parent3c8ccf5eec3177ed8976ed5ff04795a20287d2d8 (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>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 4 insertions, 13 deletions
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],