diff options
author | Tomas Chvatal <tchvatal@suse.cz> | 2012-08-13 22:58:18 +0200 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2012-08-14 10:59:56 -0400 |
commit | aabcf5ea30195274c79ae94c0fe6edc965f5c123 (patch) | |
tree | bdb3457769168a01f835ded345afc46e4f194e3b /configure.ac | |
parent | aef90993621331f01d17b95a751d4924d77eed0c (diff) |
Add switch for udev to disable automagic detection.
Signed-off-by: Tomas Chvatal <tchvatal@suse.cz>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 86199f22..57f6742a 100644 --- a/configure.ac +++ b/configure.ac @@ -81,10 +81,17 @@ PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], HAVE_XEXTPROTO_71="no") AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ]) - -PKG_CHECK_MODULES(LIBUDEV, [libudev], [LIBUDEV=yes], [LIBUDEV=no]) -if test "x$LIBUDEV" = xyes; then - AC_DEFINE(HAVE_LIBUDEV, 1,[libudev support]) +AC_ARG_ENABLE([udev], + AS_HELP_STRING([--disable-udev], [Disable libudev support [default=auto]]), + [enable_udev="$enableval"], + [enable_udev=auto]) +if test "x$enable_udev" != "xno"; then + PKG_CHECK_MODULES(LIBUDEV, [libudev], [LIBUDEV=yes], [LIBUDEV=no]) + if test "x$LIBUDEV" = xyes; then + AC_DEFINE(HAVE_LIBUDEV, 1,[libudev support]) + elif test "x$enable_udev" != "xauto"; then + AC_MSG_ERROR([Building with udev requested but libudev not found]) + fi fi AM_CONDITIONAL(LIBUDEV, test x$LIBUDEV = xyes) |