From 3e7af1922c833cade19d0935039a6e6dc44e3e57 Mon Sep 17 00:00:00 2001 From: Benedikt Morbach Date: Sat, 30 Jun 2012 23:14:02 +0200 Subject: [PATCH] Get udevrulesdir from pkg-config udev upstream likes to move this around (they just did it again, during the udev -> systemd merge) But they provide a standard way to find the dir through pkg-config. This has been around for ages, so use it. --- configure.ac | 17 +++++++++-------- rules/Makefile.am | 1 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index adf083e..23eb50c 100644 --- a/configure.ac +++ b/configure.ac @@ -179,6 +179,15 @@ fi AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$systemdsystemunitdir"]) dnl --------------------------------------------------------------------------- +dnl - Where to install udev rules +dnl --------------------------------------------------------------------------- +if test "$prefix" = "/usr" -o "$prefix" = "/usr/local" ; then + AC_SUBST([udevrulesdir], [$($PKG_CONFIG --variable=udevdir udev)/rules.d]) +else + AC_SUBST([udevrulesdir], [$prefix/lib/udev/rules.d]) +fi + +dnl --------------------------------------------------------------------------- dnl - Build DBus examples dnl --------------------------------------------------------------------------- AC_ARG_ENABLE(examples, AS_HELP_STRING([--enable-examples],[enable DBus example code]), @@ -266,14 +275,6 @@ else fi AM_CONDITIONAL(HAVE_VAPIGEN, [test "x$has_vapigen" = "xyes"]) -# udev rules go in /lib, not /usr/lib -if test "$prefix" = "/usr" -o "$prefix" = "/usr/local" ; then - slashlibdir=/lib -else - slashlibdir=$prefix/lib -fi -AC_SUBST(slashlibdir) - # per-machine directory AC_SUBST(CD_SYSTEM_PROFILES_DIR, "\$(localstatedir)/lib/colord/icc") diff --git a/rules/Makefile.am b/rules/Makefile.am index b750cd5..45efd3d 100644 --- a/rules/Makefile.am +++ b/rules/Makefile.am @@ -1,4 +1,3 @@ -udevrulesdir = $(slashlibdir)/udev/rules.d udevrules_DATA = \ 69-cd-sensors.rules \ 95-cd-devices.rules -- 1.7.10.4