mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-04-23 12:10:40 +02:00
build: detect udev rules dir
Udev rules may live in either /lib/udev/rules.d or /usr/lib/udev/rules.d depending on the distro. Remove the heuristic for deciding the dir, use pkgconfig to detect the location and allow it to be set manually. v2: fix specifying --with-udevrulesdir Signed-off-by: Richard Hughes <richard@hughsie.com>
This commit is contained in:
parent
5b02923e01
commit
04faa0e143
2 changed files with 5 additions and 8 deletions
12
configure.ac
12
configure.ac
|
|
@ -82,13 +82,11 @@ AM_CONDITIONAL(MAN_PAGES_ENABLED, test x$enable_man_pages = xyes)
|
|||
|
||||
GTK_DOC_CHECK([1.11],[--flavour no-tmpl])
|
||||
|
||||
# udev rules go in /lib, not /usr/lib
|
||||
if test "$prefix" = "/usr" -o "$prefix" = "/usr/local" ; then
|
||||
slashlibdir=/lib
|
||||
else
|
||||
slashlibdir=$prefix/lib
|
||||
fi
|
||||
AC_SUBST(slashlibdir)
|
||||
AC_ARG_WITH([udevrulesdir],
|
||||
AS_HELP_STRING([--with-udevrulesdir=DIR], [Directory for udev rules]),
|
||||
[],
|
||||
[with_udevrulesdir=$($PKG_CONFIG --variable=udevdir udev)"/rules.d"])
|
||||
AC_SUBST([udevrulesdir], [$with_udevrulesdir])
|
||||
|
||||
# History/Db dir
|
||||
AC_ARG_WITH([historydir],
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
udevrulesdir = $(slashlibdir)/udev/rules.d
|
||||
udevrules_DATA = \
|
||||
95-upower-battery-recall-dell.rules \
|
||||
95-upower-battery-recall-fujitsu.rules \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue