Mesa (master): configure: don't require libudev for gbm or egl drm/wayland
Emil Velikov
evelikov at kemper.freedesktop.org
Sat Apr 5 13:08:54 UTC 2014
Module: Mesa
Branch: master
Commit: 81799c82e47b34db6eeca34113016d2d8389669d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=81799c82e47b34db6eeca34113016d2d8389669d
Author: Jonathan Gray <jsg at jsg.id.au>
Date: Sun Mar 23 15:53:08 2014 +1100
configure: don't require libudev for gbm or egl drm/wayland
After the loader changes libudev is no longer required for
gbm or the egl drm/wayland platforms. Lets these build/run
on OpenBSD.
v2: preserve the libudev requirement for Linux as suggested
by Emil Velikov.
Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
Cc: "10.1" <mesa-stable at lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
---
configure.ac | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0ae332b..ee5c2d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -797,6 +797,13 @@ if test "x$have_libdrm" = xyes; then
DEFINES="$DEFINES -DHAVE_LIBDRM"
fi
+case "$host_os" in
+linux*)
+ need_libudev=yes ;;
+*)
+ need_libudev=no ;;
+esac
+
PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED],
have_libudev=yes, have_libudev=no)
@@ -1157,7 +1164,7 @@ if test "x$enable_gbm" = xauto; then
esac
fi
if test "x$enable_gbm" = xyes; then
- if test x"$have_libudev" != xyes; then
+ if test "x$need_libudev$have_libudev" = xyesno; then
AC_MSG_ERROR([gbm requires udev >= $LIBUDEV_REQUIRED])
fi
@@ -1169,7 +1176,11 @@ if test "x$enable_gbm" = xyes; then
fi
fi
AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes)
-GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED"
+if test "x$need_libudev" = xyes; then
+ GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED"
+else
+ GBM_PC_REQ_PRIV=""
+fi
GBM_PC_LIB_PRIV="$DLOPEN_LIBS"
AC_SUBST([GBM_PC_REQ_PRIV])
AC_SUBST([GBM_PC_LIB_PRIV])
@@ -1454,8 +1465,8 @@ for plat in $egl_platforms; do
;;
esac
- case "$plat$have_libudev" in
- waylandno|drmno)
+ case "$plat$need_libudev$have_libudev" in
+ waylandyesno|drmyesno)
AC_MSG_ERROR([cannot build $plat platform without udev >= $LIBUDEV_REQUIRED]) ;;
esac
done
@@ -1717,7 +1728,7 @@ gallium_require_llvm() {
gallium_require_drm_loader() {
if test "x$enable_gallium_loader" = xyes; then
- if test "x$have_libudev" != xyes; then
+ if test "x$need_libudev$have_libudev" = xyesno; then
AC_MSG_ERROR([Gallium drm loader requires libudev >= $LIBUDEV_REQUIRED])
fi
if test "x$have_libdrm" != xyes; then
More information about the mesa-commit
mailing list