From 049eae8ec20f0b3dd37d6f4b843da318966d4346 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 8 Jan 2009 21:09:18 +0100 Subject: [PATCH] Add support for reading rules directory from libudev.pc --- configure.ac | 5 +++++ src/Makefile.am | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 223e1e0..a6cc07c 100644 --- a/configure.ac +++ b/configure.ac @@ -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) diff --git a/src/Makefile.am b/src/Makefile.am index a540bf1..5a11f4f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 -- 2.7.4