--- origsrc/Mesa-7.8.2/configure.ac 2010-10-07 15:19:55.015847300 -0500 +++ origsrc/Mesa-7.8.2/configure.ac 2010-10-07 15:23:25.318945000 -0500 @@ -617,17 +617,25 @@ dri) 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" + + case "$host_os" in + cygwin*|darwin*) + ;; + *) + # Check for libdrm + PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED xxf86vm]) + PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED]) + GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED xxf86vm dri2proto >= $DRI2PROTO_REQUIRED glproto >= $GLPROTO_REQUIRED" + DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED xxf86vm" + ;; + esac # find the DRI deps for libGL if test "$x11_pkgconfig" = yes; then # add xcb modules if necessary - dri_modules="x11 xext xxf86vm xdamage xfixes" + dri_modules="x11 xext xdamage xfixes" + if test "$enable_xcb" = yes; then dri_modules="$dri_modules x11-xcb xcb-glx" fi @@ -800,6 +809,12 @@ 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 --- origsrc/Mesa-7.8.2/src/glx/dri_common.c 2010-10-07 15:19:55.020847600 -0500 +++ origsrc/Mesa-7.8.2/src/glx/dri_common.c 2010-10-07 15:08:02.000000000 -0500 @@ -106,7 +106,11 @@ driOpenDriver(const char *driverName) int len; /* Attempt to make sure libGL symbols will be visible to the driver */ +#ifdef __CYGWIN__ + glhandle = dlopen("cygGL-1.dll", RTLD_NOW | RTLD_GLOBAL); +#else glhandle = dlopen("libGL.so.1", RTLD_NOW | RTLD_GLOBAL); +#endif libPaths = NULL; if (geteuid() == getuid()) { --- origsrc/Mesa-7.8.2/src/glx/glxext.c 2010-06-15 12:43:47.000000000 -0500 +++ origsrc/Mesa-7.8.2/src/glx/glxext.c 2010-10-07 15:15:18.195676600 -0500 @@ -41,7 +41,9 @@ #include "glxclient.h" #include #include +#ifdef GLX_DIRECT_RENDERING #include +#endif #ifdef GLX_USE_APPLEGL #include "apple_glx.h" #include "apple_visual.h" --- origsrc/Mesa-7.8.2/src/mesa/main/dlopen.c 2010-10-07 15:19:55.025847900 -0500 +++ origsrc/Mesa-7.8.2/src/mesa/main/dlopen.c 2010-10-07 15:08:02.000000000 -0500 @@ -31,6 +31,10 @@ #include "compiler.h" #include "dlopen.h" +#ifdef __CYGWIN__ +#define _GNU_SOURCE +#endif + #if defined(_GNU_SOURCE) && !defined(__MINGW32__) && !defined(__blrts) #include #endif --- origsrc/Mesa-7.8.2/src/mesa/main/texcompress_s3tc.c 2010-10-07 15:19:55.030848200 -0500 +++ origsrc/Mesa-7.8.2/src/mesa/main/texcompress_s3tc.c 2010-10-07 15:08:02.000000000 -0500 @@ -48,7 +48,7 @@ #if FEATURE_texture_s3tc -#ifdef __MINGW32__ +#if defined(__MINGW32__) || defined(__CYGWIN__) #define DXTN_LIBNAME "dxtn.dll" #define RTLD_LAZY 0 #define RTLD_GLOBAL 0