From e32326569990cdcc2d3961fc39ab8baf4a1ca7e0 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 | 13 +++++-------- rules/Makefile.am | 1 - 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index adf083e..21cedae 100644 --- a/configure.ac +++ b/configure.ac @@ -179,6 +179,11 @@ fi AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$systemdsystemunitdir"]) dnl --------------------------------------------------------------------------- +dnl - Where to install udev rules +dnl --------------------------------------------------------------------------- +AC_SUBST([udevrulesdir], [$($PKG_CONFIG --variable=udevdir udev)/rules.d]) + +dnl --------------------------------------------------------------------------- dnl - Build DBus examples dnl --------------------------------------------------------------------------- AC_ARG_ENABLE(examples, AS_HELP_STRING([--enable-examples],[enable DBus example code]), @@ -266,14 +271,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