Signed-off-by: Peter Hutterer <[email protected]>
---
This technically changes behaviour since before building into a prefix of
/foo would install the rules in /foo/udev/rules.d. For such setups, I think
it'd be better to set up the udev pkgconfig file correctly. The exception
here is make distcheck though - which would break with this patch.
I vaguely remember there being some autotools magic to work around this, but
I can't seem to find it. Gaetan?
configure.ac | 17 ++++-------------
1 file 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],
--
1.7.10.4
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel