summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2012-09-14 21:04:42 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-09-14 21:04:42 +0100
commit3b9259f7cedc179617bc24b3912d2d8d75c5a824 (patch)
treef288c11abb18177527c60bd291178c9dab9c1b79
parentd995705fb01842652a79076cbecee4392f653bfe (diff)
downloadxorg-driver-xf86-video-intel-3b9259f7cedc179617bc24b3912d2d8d75c5a824.tar.gz
configure: Make udev dependency optional
In order to support buildbots where the udev headers may exist on the build system but not the target, we need explicit control over optional dependencies. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54942
-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])