From f97cce40ee2cf349ce592badcd3e09de1621716d Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Wed, 21 Apr 2010 14:42:51 +0100 Subject: [PATCH 2/3] Cygwin: Enable mesa to be built for Cygwin -with-driver=dri with indirect rendering only Various changes to enable mesa to be built for Cygwin -with-driver=dri with indirect rendering only rather than -with-driver=xlib Don't require all platforms to have LIBDRM, but introduce no_drm_is_fatal to make behaviour on platforms which expect to have DRM available the same as before, i.e. terminating configure with an error if DRM is not available Signed-off-by: Jon TURNEY --- configure.ac | 25 ++++++++++++++++++++++--- 1 files changed, 22 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index d6a615b..a13391f 100644 --- a/configure.ac +++ b/configure.ac @@ -583,6 +583,14 @@ else enable_xcb=no fi +dnl is DRM expected on the target platform? +no_drm_is_fatal=yes +case "$host_os" in +cygwin*) + no_drm_is_fatal=no + ;; +esac + dnl dnl libGL configuration per driver dnl @@ -617,11 +625,18 @@ dri) fi # Check for libdrm - PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED]) + PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED], HAVE_LIBDRM=yes, HAVE_LIBDRM=no) 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" + + if test "$HAVE_LIBDRM" = no; then + if test "$no_drm_is_fatal" = yes; then + AC_MSG_ERROR([LIBDRM $LIBDRM_REQUIRED is required by DRI driver]) + fi + else + GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED glproto >= $GLPROTO_REQUIRED" + DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED" + fi # find the DRI deps for libGL if test "$x11_pkgconfig" = yes; then @@ -808,6 +823,10 @@ if test "$mesa_driver" = dri; then DEFINES="$DEFINES -DGLX_DIRECT_RENDERING" fi ;; + cygwin*) + DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" + DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING" + ;; esac # default drivers -- 1.7.0.4