Add support for reading rules directory from libudev.pc
authorMarcel Holtmann <marcel@holtmann.org>
Thu, 8 Jan 2009 20:09:18 +0000 (21:09 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 8 Jan 2009 20:09:18 +0000 (21:09 +0100)
configure.ac
src/Makefile.am

index 223e1e0..a6cc07c 100644 (file)
@@ -186,6 +186,11 @@ if (test "${enable_udev}" = "yes"); then
                        [Define to 1 if you need the
                                udev_device_get_parent_with_subsystem_devtype()
                                                                        function.]))
+       UDEV_DATADIR="`pkg-config --variable=rulesdir libudev`"
+       if (test -z "${UDEV_DATADIR}"); then
+               UDEV_DATADIR="${sysconfdir}/udev/rules.d"
+       fi
+       AC_SUBST(UDEV_DATADIR)
 fi
 AC_SUBST(UDEV_CFLAGS)
 AC_SUBST(UDEV_LIBS)
index a540bf1..5a11f4f 100644 (file)
@@ -13,7 +13,7 @@ connmand_SOURCES = main.c connman.h log.c selftest.c error.c plugin.c \
 if UDEV
 connmand_SOURCES += udev.c
 
-rulesdir = $(sysconfdir)/udev/rules.d
+rulesdir = @UDEV_DATADIR@
 
 rules_DATA = 92-connman.rules
 endif