summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2016-08-30 21:15:44 -0400
committerDavid Sterba <dsterba@suse.com>2016-09-05 10:05:26 +0200
commit752d8fda32ac645d0cfba82b10e26e17796e626b (patch)
tree5430553be9a483fb7518d58d9b6d77f4031576c5 /configure.ac
parentaa6baa178dd9215ef3aeaaf7deac1090bfa76743 (diff)
btrfs-progs: build: only install udev rules for udev >= 190
Prior to udev v190, there was no btrfs builtin helper. Installing it on systems with an older udev will cause problems. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 97e89f23..8fd8f425 100644
--- a/configure.ac
+++ b/configure.ac
@@ -161,7 +161,13 @@ PKG_STATIC(UUID_LIBS_STATIC, [uuid])
PKG_CHECK_MODULES(ZLIB, [zlib])
PKG_STATIC(ZLIB_LIBS_STATIC, [zlib])
-UDEVDIR="$(pkg-config udev --variable=udevdir)"
+# udev v190 introduced the btrfs builtin and a udev rule to use it.
+# Our udev rule gives us the friendly dm names but isn't required (or valid)
+# on earlier releases.
+UDEVDIR=
+if pkg-config udev --atleast-version 190; then
+ UDEVDIR="$(pkg-config udev --variable=udevdir)"
+fi
AC_SUBST(UDEVDIR)
dnl lzo library does not provide pkg-config, let use classic way