diff options
author | Tom Gundersen <teg@jklm.no> | 2013-03-20 17:31:21 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2013-05-07 14:15:26 +0100 |
commit | 04faa0e1438f3bfbc0644c9adf9e6e17e06da389 (patch) | |
tree | 1c194e8108f5ce135940c9a3bfcf63069f4886d1 /configure.ac | |
parent | 5b02923e012589930a78053fb0cbc9caa1675206 (diff) |
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>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 84939e3..cc4bf91 100644 --- a/configure.ac +++ b/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], |