summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
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],