diff --git a/configure.in b/configure.in index 3ae3209..60da1fa 100644 --- a/configure.in +++ b/configure.in @@ -120,8 +120,14 @@ AM_CONDITIONAL(USE_XMLTO, test x"$xmlto" = xyes) AC_ARG_WITH( [udev-rules-dir], - AS_HELP_STRING([--with-udev-rules-dir],[Directory where to install udev rules to (defaults to /lib/udev/rules.d)]), - [udevrulesdir=$withval], [udevrulesdir="/lib/udev/rules.d"]) + AS_HELP_STRING([--with-udev-rules-dir=DIR],[Directory where to install udev rules to (default=auto)]), + [udevrulesdir="$withval"], + [udevdir=$($PKG_CONFIG udev --variable=udevdir) + if test "x$udevdir" = "x"; then + udevrulesdir="/lib/udev/rules.d" + else + udevrulesdir="$udevdir/rules.d" + fi]) AC_SUBST(udevrulesdir) dnl Checks for header files.