From b4b65f2273042a6bedcd2eb4743b1485322d3b33 Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Wed, 29 Aug 2012 13:12:41 +0300 Subject: [PATCH] respect autoconf PREFIX when installing udev rules file The current way of deducting the install path for the udev rules file ignores PREFIX. Fix this by prepending PREFIX to pkg-config's idea of the path. Do this only if PREFIX is pointing to something non-standard that is it isn't empty, /usr or /usr/local/, since in all these cases we should install under the same location, reported by pkg-config (atm this is /lib/udev/rules.d). Signed-off-by: Imre Deak --- configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2e1e021..42f90bf 100644 --- a/configure.ac +++ b/configure.ac @@ -92,9 +92,15 @@ AC_ARG_WITH(hal-fdi-dir, HAL_FDI_DIR=${halfdidir} AC_SUBST(HAL_FDI_DIR) +if test "x$prefix" = "xNONE" -o "x$prefix" = "x/usr" -o \ + "x$prefix" = "x/usr/local"; then + udevdataroot= +else + udevdataroot=$prefix +fi PKG_CHECK_MODULES(UDEV, udev, - [UDEV_RULES_DIR="`$PKG_CONFIG --variable=udevdir udev`/rules.d"], + [UDEV_RULES_DIR="$udevdataroot/`$PKG_CONFIG --variable=udevdir udev`/rules.d"], [UDEV_RULES_DIR=no]) AC_ARG_WITH(udev-rules-dir, -- 1.7.9.5