On Mar 19, 2013 5:31 AM, "Tom Gundersen" <t...@jklm.no> wrote: > > 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. > --- > configure.ac | 12 +++++------- > rules/Makefile.am | 1 - > 2 files changed, 5 insertions(+), 8 deletions(-) > > diff --git a/configure.ac b/configure.ac > index 56db585..c03e8e8 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([udevdir], > + AS_HELP_STRING([--with-udevrulesdir=DIR], [Directory for udev rules]), > + [], > + [with_udevrulesdir=$($PKG_CONFIG --variable=udevdir udev)"/rules.d"]) > +AC_SUBST([udevrulesdir], [$with_udevrulesdir])
Did you test that the manual setting actually worked? You're passing udevdir to AC_ARG_WITH, which will cause autoconf to set with_udevdir. That's not what you're using for the actual setting (with_udevrulesdir). I think if you change it to [udevrulesdir] it will work. Also, it might be a good idea to be defensive and check that pkg-config returned anything useful. That's pretty unlikely at that point, though. Otherwise, this seems good to me. Dan
_______________________________________________ devkit-devel mailing list devkit-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/devkit-devel