configure: Ensure udev rules are installed in rules.d

udevdir is set to the udev root, e.g. /lib/udev, while rules need to
live in the rules.d subdirectory.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I9416eb7e5a99a4bf8391a4ba135c26f43a79822c
diff --git a/configure.ac b/configure.ac
index c66458c..1e8a419 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,13 +23,15 @@
 PKG_INSTALLDIR
 PKG_CHECK_MODULES(udev,
                   udev,
-                  [PKG_CHECK_VAR(udevrulesdir, udev, udevdir)],
+                  [PKG_CHECK_VAR(udevdir, udev, udevdir)],
                   [])
 
+AC_SUBST([udevrulesdir], [$udevdir/rules.d])
+
 AC_ARG_ENABLE([astlpc-raw-kcs],
               [AS_HELP_STRING([--enable-astlpc-raw-kcs],
                               [Use udev rules to symlink raw-kcs device nodes for the astlpc binding])])
-AM_CONDITIONAL([LIBMCTP_UDEV_RAW_KCS], [test -n "$udevrulesdir" -a "x$enable_astlpc_raw_kcs" = "xyes"])
+AM_CONDITIONAL([LIBMCTP_UDEV_RAW_KCS], [test -n "$udevdir" -a "x$enable_astlpc_raw_kcs" = "xyes"])
 
 AC_ARG_WITH([systemdsystemunitdir],
      [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],