From: Marcel Holtmann Date: Thu, 8 Jan 2009 20:09:18 +0000 (+0100) Subject: Add support for reading rules directory from libudev.pc X-Git-Tag: 0.8~12 X-Git-Url: http://git.maemo.org/git/?p=connman;a=commitdiff_plain;h=049eae8ec20f0b3dd37d6f4b843da318966d4346;ds=sidebyside Add support for reading rules directory from libudev.pc --- 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