From 478da6ca1aabb23124551830d0bd619eb20b7431 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 | 28 +++++++++++++++++++++++++--- 1 files changed, 25 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index c68b002..d9eac22 100644 --- a/configure.ac +++ b/configure.ac @@ -557,6 +557,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 @@ -591,11 +599,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 @@ -836,6 +851,13 @@ 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" + if test "x$DRI_DIRS" = "xyes"; then + DRI_DIRS="swrast" + fi + ;; esac # default drivers -- 1.7.1