Fixup --without-x build

Accept gl linkage in hope of future offscreen mesa support.
Avoid linking with GLX though.

Change-Id: I4e666f60e74fe34075a8da9eeba95807cf8fe38c
Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/13452
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
This commit is contained in:
Riccardo Magliocchetti
2014-12-22 19:10:59 +01:00
committed by Michael Stahl
parent 7ce1e0e1ec
commit b9a847b78c
14 changed files with 63 additions and 32 deletions

View File

@@ -17,6 +17,7 @@
#if defined( MACOSX )
#elif defined( IOS )
#elif defined( ANDROID )
#elif defined( LIBO_HEADLESS )
#elif defined( UNX )
# include <prex.h>
# include "GL/glxew.h"
@@ -42,6 +43,7 @@ class NSOpenGLView;
#endif
#elif defined( IOS )
#elif defined( ANDROID )
#elif defined( LIBO_HEADLESS )
#elif defined( UNX )
#include <GL/glext.h>
#define GLX_GLXEXT_PROTOTYPES 1
@@ -110,6 +112,7 @@ struct GLWindow
#elif defined( MACOSX )
#elif defined( IOS )
#elif defined( ANDROID )
#elif defined( LIBO_HEADLESS )
#elif defined( UNX )
Display* dpy;
int screen;
@@ -137,6 +140,7 @@ struct GLWindow
#elif defined( MACOSX )
#elif defined( IOS )
#elif defined( ANDROID )
#elif defined( LIBO_HEADLESS )
#elif defined( UNX )
dpy(NULL),
screen(0),
@@ -176,7 +180,7 @@ public:
// these methods are for the deep platform layer, don't use them in normal code
// only in vcl's platform code
#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID
#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined(LIBO_HEADLESS)
bool init(Display* dpy, Window win, int screen);
bool init(Display* dpy, Pixmap pix, unsigned int width, unsigned int height, int nScreen);
#elif defined( _WIN32 )
@@ -237,7 +241,7 @@ private:
SAL_DLLPRIVATE bool InitGLEW();
SAL_DLLPRIVATE bool initWindow();
SAL_DLLPRIVATE bool ImplInit();
#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID
#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined(LIBO_HEADLESS)
SAL_DLLPRIVATE void initGLWindow(Visual* pVisual);
#endif
@@ -255,7 +259,7 @@ private:
bool mbRequestLegacyContext;
bool mbUseDoubleBufferedRendering;
bool mbRequestVirtualDevice;
#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID
#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined(LIBO_HEADLESS)
bool mbPixmap; // is a pixmap instead of a window
#endif