On 12-08-04 03:18 AM, Peter Hutterer wrote: > Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> > --- > This technically changes behaviour since before building into a prefix of > /foo would install the rules in /foo/udev/rules.d. For such setups, I think > it'd be better to set up the udev pkgconfig file correctly. The exception > here is make distcheck though - which would break with this patch. > > I vaguely remember there being some autotools magic to work around this, but > I can't seem to find it. Gaetan? Similar to:
# Ensure xorg.conf.d snippets are installed below $(prefix) for distcheck DISTCHECK_CONFIGURE_FLAGS = --with-xorg-conf-dir='$${datadir}/X11/xorg.conf.d' in the toplevel Makefile. This ensures that a writable directory is used during the installation simulation done by 'make distcheck'. Assuming --with-udev-rules-dir is the option to specify the location of rules.d, this option can be added to DISTCHECK_CONFIGURE_FLAGS. > > configure.ac | 17 ++++------------- > 1 file changed, 4 insertions(+), 13 deletions(-) > > diff --git a/configure.ac b/configure.ac > index d2fb0b6..2e1e021 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -92,19 +92,10 @@ AC_ARG_WITH(hal-fdi-dir, > HAL_FDI_DIR=${halfdidir} > AC_SUBST(HAL_FDI_DIR) > > -case $host_os in > - linux*) > - if test "x$prefix" = "xNONE" -o "x$prefix" = "x/usr" -o "x$prefix" = > "x/usr/local" ; then > - slashlibdir=/lib > - else > - slashlibdir=$prefix/lib > - fi > - UDEV_RULES_DIR=$slashlibdir/udev/rules.d > - ;; > - *) > - UDEV_RULES_DIR=no > - ;; > -esac > + > +PKG_CHECK_MODULES(UDEV, udev, > + [UDEV_RULES_DIR="`$PKG_CONFIG --variable=udevdir > udev`/rules.d"], > + [UDEV_RULES_DIR=no]) > > AC_ARG_WITH(udev-rules-dir, > AC_HELP_STRING([--with-udev-rules-dir=DIR],
_______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel