summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-09-27 18:04:06 +0100
committerKeith Packard <keithp@keithp.com>2011-10-03 11:55:36 -0700
commitfad04dd9701aa76249a0bab31676103debb84307 (patch)
treea4b690eeede6f1f610918d3295b715eb406fefab /configure.ac
parent77743f877d573cdf70fcb5cb5897250f668ebf9b (diff)
udev: make use of udev_enumerate_add_match_tag() only when it is available
udev_enumerate_add_match_tag() and udev_monitor_filter_add_match_tag() are mostly optimizations, hence simply skip these calls if they are not available in the installed version of libudev. This should fix the build on older versions of udev. [airlied: fixes tinderbox failures on RHEL6] Signed-off-by: Lennart Poettering <lennart@poettering.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Tested-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ecd538674..7c5aaaf03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -822,6 +822,15 @@ if test "x$CONFIG_UDEV" = xyes; then
AC_MSG_ERROR([udev configuration API requested, but libudev is not installed])
fi
AC_DEFINE(CONFIG_UDEV, 1, [Use libudev for input hotplug])
+
+ SAVE_LIBS=$LIBS
+ SAVE_CFLAGS=$CFLAGS
+ CFLAGS=$UDEV_CFLAGS
+ LIBS=$UDEV_LIBS
+ AC_CHECK_FUNCS([udev_monitor_filter_add_match_tag])
+ AC_CHECK_FUNCS([udev_enumerate_add_match_tag])
+ LIBS=$SAVE_LIBS
+ CFLAGS=$SAVE_CFLAGS
fi
dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas