From dfcdee310100fa0297f6d15dbadb673283c9a06a Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 5 Sep 2011 18:24:05 +0300 Subject: 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 [laurent.pinchart@ideasonboard.com: Remove media_private structure] Signed-off-by: Laurent Pinchart --- configure.in | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'configure.in') 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], -- cgit v1.2.3