Commit 23740ed0 authored by Emil Velikov's avatar Emil Velikov

configure: enable dri3 only for linux

Currently only linux can make use of dri3, so it would make sense to
enable it explicitly for the platform.
Drop a duplicated libudev check while we're at it.

v3: Properly handle dri3 and reword commit message.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76377
Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov's avatarEmil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner's avatarMatt Turner <mattst88@gmail.com>
parent ec4b8d16
...@@ -527,11 +527,20 @@ AC_ARG_ENABLE([dri], ...@@ -527,11 +527,20 @@ AC_ARG_ENABLE([dri],
[enable DRI modules @<:@default=enabled@:>@])], [enable DRI modules @<:@default=enabled@:>@])],
[enable_dri="$enableval"], [enable_dri="$enableval"],
[enable_dri=yes]) [enable_dri=yes])
case "$host_os" in
linux*)
dri3_default=yes
;;
*)
dri3_default=no
;;
esac
AC_ARG_ENABLE([dri3], AC_ARG_ENABLE([dri3],
[AS_HELP_STRING([--enable-dri3], [AS_HELP_STRING([--enable-dri3],
[enable DRI3 @<:@default=enabled@:>@])], [enable DRI3 @<:@default=auto@:>@])],
[enable_dri3="$enableval"], [enable_dri3="$enableval"],
[enable_dri3=yes]) [enable_dri3="$dri3_default"])
AC_ARG_ENABLE([glx], AC_ARG_ENABLE([glx],
[AS_HELP_STRING([--enable-glx], [AS_HELP_STRING([--enable-glx],
[enable GLX library @<:@default=enabled@:>@])], [enable GLX library @<:@default=enabled@:>@])],
...@@ -823,9 +832,6 @@ xyesno) ...@@ -823,9 +832,6 @@ xyesno)
PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED]) PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV libdrm >= $LIBDRM_REQUIRED" GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV libdrm >= $LIBDRM_REQUIRED"
if test x"$enable_dri3" = xyes; then if test x"$enable_dri3" = xyes; then
if test x"$have_libudev" != xyes; then
AC_MSG_ERROR([DRI3 requires libudev >= $LIBUDEV_REQUIRED])
fi
PKG_CHECK_MODULES([DRI3PROTO], [dri3proto >= $DRI3PROTO_REQUIRED]) PKG_CHECK_MODULES([DRI3PROTO], [dri3proto >= $DRI3PROTO_REQUIRED])
PKG_CHECK_MODULES([PRESENTPROTO], [presentproto >= $PRESENTPROTO_REQUIRED]) PKG_CHECK_MODULES([PRESENTPROTO], [presentproto >= $PRESENTPROTO_REQUIRED])
fi fi
...@@ -978,7 +984,7 @@ if test "x$enable_dri" = xyes; then ...@@ -978,7 +984,7 @@ if test "x$enable_dri" = xyes; then
gnu*) gnu*)
DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1" DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1"
DEFINES="$DEFINES -DHAVE_ALIAS" DEFINES="$DEFINES -DHAVE_ALIAS"
;; ;;
solaris*) solaris*)
DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1" DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1"
;; ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment