summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2011-09-05 18:24:05 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-09-06 12:19:43 +0200
commitdfcdee310100fa0297f6d15dbadb673283c9a06a (patch)
treeca0cad903ef9835d4f85149cf75d1cff777b0c3d /configure.in
parent1690efe5a4daf5cd2d1b71c49286c376cc7fcc15 (diff)
libmediactl: get the device name via udev
If configured with --with-libudev, the libmediactl is built with libudev support. It allows to get the device name in right way in the modern linux systems. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> [laurent.pinchart@ideasonboard.com: Remove media_private structure] Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 9f91313..6903451 100644
--- a/configure.in
+++ b/configure.in
@@ -13,6 +13,28 @@ AC_PROG_LIBTOOL
# Checks for libraries.
+AC_ARG_WITH([libudev],
+ AS_HELP_STRING([--with-libudev],
+ [Enable libudev to detect a device name]))
+
+AS_IF([test "x$with_libudev" = "xyes"],
+ [PKG_CHECK_MODULES(libudev, libudev, have_libudev=yes, have_libudev=no)],
+ [have_libudev=no])
+
+AS_IF([test "x$have_libudev" = "xyes"],
+ [
+ AC_DEFINE([HAVE_LIBUDEV], [], [Use libudev])
+ LIBUDEV_CFLAGS="$libudev_CFLAGS"
+ LIBUDEV_LIBS="$libudev_LIBS"
+ AC_SUBST(LIBUDEV_CFLAGS)
+ AC_SUBST(LIBUDEV_LIBS)
+ ],
+ [AS_IF([test "x$with_libudev" = "xyes"],
+ [AC_MSG_ERROR([libudev requested but not found])
+ ])
+])
+
+
# Kernel headers path.
AC_ARG_WITH(kernel-headers,
[AC_HELP_STRING([--with-kernel-headers=DIR],