diff -Naur tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am tigervnc-1.2.0-magellan/unix/xserver/hw/vnc/Makefile.am --- tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am 2013-02-18 17:21:34.262000000 +0000 +++ tigervnc-1.2.0-magellan/unix/xserver/hw/vnc/Makefile.am 2013-02-18 17:26:42.771000000 +0000 @@ -8,6 +8,10 @@ OS_LIB=$(LIB_DIR)/os/libos.la COMMON_LIBS=$(NETWORK_LIB) $(RFB_LIB) $(RDR_LIB) $(XREGION_LIB) +if GLX +GLX_LIB = $(top_srcdir)/glx/libglx.la +endif + noinst_LTLIBRARIES = libvnccommon.la HDRS = RegionHelper.h vncExtInit.h vncHooks.h XserverDesktop.h xorg-version.h \ @@ -32,10 +36,8 @@ nodist_Xvnc_SOURCES = fbrop.h fb.h pixman.h Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DTIGERVNC -DNO_MODULE_EXTS \ - -UHAVE_CONFIG_H \ - -DXFree86Server -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ - -DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(TIGERVNC_SRCDIR)/common \ - -I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS} -I$(includedir) + -I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS} -I$(includedir) \ + -I$(top_srcdir)/glx Xvnc_LDADD = $(XVNC_LIBS) libvnccommon.la $(COMMON_LIBS) \ $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XVNC_SYS_LIBS) -lX11 @@ -56,7 +58,7 @@ libvnc_la_LDFLAGS = -module -avoid-version -Wl,-z,now -libvnc_la_LIBADD = libvnccommon.la $(COMMON_LIBS) $(OS_LIB) +libvnc_la_LIBADD = libvnccommon.la $(COMMON_LIBS) $(OS_LIB) $(GLX_LIB) EXTRA_DIST = Xvnc.man diff -Naur tigervnc-1.2.0/unix/xserver/hw/vnc/xvnc.cc tigervnc-1.2.0-magellan/unix/xserver/hw/vnc/xvnc.cc --- tigervnc-1.2.0/unix/xserver/hw/vnc/xvnc.cc 2013-02-18 17:21:41.375000000 +0000 +++ tigervnc-1.2.0-magellan/unix/xserver/hw/vnc/xvnc.cc 2013-02-18 17:28:30.183000000 +0000 @@ -87,6 +87,17 @@ #include "version-config.h" #include "site.h" #endif + +#if XORG >= 113 +#ifdef GLXEXT +/* C++ really is the worst */ +#define private _private +#include "glxserver.h" +#undef private +#include "glx_extinit.h" +#endif +#endif + #undef class #undef public } @@ -1392,6 +1403,16 @@ dispatchException &= ~DE_RESET; } +#if XORG >= 113 +#ifdef GLXEXT +static ExtensionModule vnc_glx_ext = { + GlxExtensionInit, + "GLX", + &noGlxExtension +}; +#endif +#endif + void InitOutput(ScreenInfo *screenInfo, int argc, char **argv) { @@ -1401,6 +1422,13 @@ int i; int NumFormats = 0; +#if XORG >= 113 +#ifdef GLXEXT + if (serverGeneration == 1) + LoadExtension(&vnc_glx_ext, TRUE); +#endif +#endif + /* initialize pixmap formats */ /* must have a pixmap depth to match every screen depth */