summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac17
1 files changed, 14 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index f94f1401..2d651e1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,9 +85,20 @@ fi
PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.2], [gen4asm=yes], [gen4asm=no])
AM_CONDITIONAL(HAVE_GEN4ASM, test x$gen4asm = xyes)
-PKG_CHECK_MODULES(UDEV, [libudev], [udev=yes], [udev=no])
-if test x"$udev" = xyes; then
- AC_DEFINE(HAVE_UDEV,1,[Enable udev-based monitor hotplug detection])
+AC_ARG_ENABLE(udev,
+ AS_HELP_STRING([--disable-udev],
+ [Disable udev-based monitor hotplug detection [default=auto]]),
+ [UDEV="$enableval"],
+ [UDEV=auto])
+
+if test x$UDEV != "xno"; then
+ PKG_CHECK_MODULES(UDEV, [libudev], [udev=yes], [udev=no])
+ if test x$UDEV == xyes -a x$udev != xyes; then
+ AC_MSG_ERROR([udev support requested but not found (libudev)])
+ fi
+ if test x$udev = xyes; then
+ AC_DEFINE(HAVE_UDEV,1,[Enable udev-based monitor hotplug detection])
+ fi
fi
PKG_CHECK_MODULES(X11, [x11 xrender xext pixman-1], [x11=yes], [x11=no])