aboutsummaryrefslogtreecommitdiff
path: root/mesalib/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/configure.ac')
-rw-r--r--mesalib/configure.ac52
1 files changed, 41 insertions, 11 deletions
diff --git a/mesalib/configure.ac b/mesalib/configure.ac
index 47fa134fc..5c6ac445c 100644
--- a/mesalib/configure.ac
+++ b/mesalib/configure.ac
@@ -729,6 +729,27 @@ else
enable_xcb=no
fi
+dnl Direct rendering or just indirect rendering
+case "$host_os" in
+gnu*)
+ dnl Disable by default on GNU/Hurd
+ driglx_direct_default="no"
+ ;;
+cygwin*)
+ dnl Disable by default on cygwin
+ driglx_direct_default="no"
+ ;;
+*)
+ driglx_direct_default="yes"
+ ;;
+esac
+AC_ARG_ENABLE([driglx-direct],
+ [AS_HELP_STRING([--disable-driglx-direct],
+ [enable direct rendering in GLX and EGL for DRI \
+ @<:@default=auto@:>@])],
+ [driglx_direct="$enableval"],
+ [driglx_direct="$driglx_direct_default"])
+
dnl
dnl libGL configuration per driver
dnl
@@ -762,12 +783,17 @@ dri|no) # these checks are still desired when there is no mesa_driver
AC_MSG_ERROR([Can't use static libraries for DRI drivers])
fi
- # Check for libdrm
- PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
- PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED])
- GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED glproto >= $GLPROTO_REQUIRED"
- DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
+ GL_PC_REQ_PRIV="glproto >= $GLPROTO_REQUIRED"
+ DRI_PC_REQ_PRIV=""
+
+ if test x"$driglx_direct" = xyes; then
+ # Check for libdrm
+ PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
+ PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
+ GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
+ DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
+ fi
# find the DRI deps for libGL
if test "$x11_pkgconfig" = yes; then
@@ -910,12 +936,6 @@ AC_ARG_WITH([dri-searchpath],
[DRI_DRIVER_SEARCH_DIR="$withval"],
[DRI_DRIVER_SEARCH_DIR='${DRI_DRIVER_INSTALL_DIR}'])
AC_SUBST([DRI_DRIVER_SEARCH_DIR])
-dnl Direct rendering or just indirect rendering
-AC_ARG_ENABLE([driglx-direct],
- [AS_HELP_STRING([--disable-driglx-direct],
- [enable direct rendering in GLX and EGL for DRI @<:@default=enabled@:>@])],
- [driglx_direct="$enableval"],
- [driglx_direct="yes"])
dnl Which drivers to build - default is chosen by platform
AC_ARG_WITH([dri-drivers],
[AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@],
@@ -1006,6 +1026,16 @@ if test "$mesa_driver" = dri -o "$mesa_driver" = no; then
DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
fi
;;
+ cygwin*)
+ DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
+ DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"
+ if test "x$driglx_direct" = xyes; then
+ DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
+ fi
+ if test "x$DRI_DIRS" = "xyes"; then
+ DRI_DIRS="swrast"
+ fi
+ ;;
esac
# default drivers