<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 12-08-04 03:18 AM, Peter Hutterer
wrote:<br>
</div>
<blockquote cite="mid:20120804071849.GA14228@yabbi.redhat.com"
type="cite">
<pre wrap="">Signed-off-by: Peter Hutterer <a class="moz-txt-link-rfc2396E" href="mailto:peter.hutterer@who-t.net"><peter.hutterer@who-t.net></a>
---
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?</pre>
</blockquote>
Similar to:<br>
<blockquote><tt># Ensure xorg.conf.d snippets are installed below
$(prefix) for distcheck<br>
DISTCHECK_CONFIGURE_FLAGS =
--with-xorg-conf-dir='$${datadir}/X11/xorg.conf.d'<br>
</tt></blockquote>
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.<br>
<blockquote cite="mid:20120804071849.GA14228@yabbi.redhat.com"
type="cite">
<pre wrap="">
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],
</pre>
</blockquote>
<br>
</body>
</html>