From 5a459a036e33683410bab4df431ed553bd0eeb66 Mon Sep 17 00:00:00 2001
From: Jon TURNEY <jon.turney@dronecode.org.uk>
Date: Mon, 12 May 2014 10:47:07 +0100
Subject: Fix build of appleglx

Define GLX_USE_APPLEGL, as config/darwin used to, to turn on specific code to
use the applegl direct renderer

Convert src/glx/apple/Makefile to automake

Since the applegl libGL is now built by linking libappleglx into libGL, rather
than by linking selected files into a special libGL:

- Remove duplicate code in apple/glxreply.c and apple/apple_glx.c.  This makes
apple/glxreply.c empty, so remove it

- Some indirect rendering code is already guarded by !GLX_USE_APPLEGL, but we
need to add those guards to indirect_glx.c, indirect_init.c (via it's
generator), render2.c and vertarr.c so they don't generate anything

Fix and update various includes

glapi_gentable.c (which is only used on darwin), should be included in shared
glapi as well, to provide _glapi_create_table_from_handle()

Note that neither swrast nor indirect is supported in the APPLEGL path at the
moment, which makes things more complex than they need to be.  More untangling
is needed to allow that

v2: Correct apple/Makefile.am for srcdir != builddir

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 src/glx/apple/apple_glapi.c | 1 +
 1 file changed, 1 insertion(+)

(limited to 'src/glx/apple/apple_glapi.c')

diff --git a/src/glx/apple/apple_glapi.c b/src/glx/apple/apple_glapi.c
index c932781..4d19f7f 100644
--- a/src/glx/apple/apple_glapi.c
+++ b/src/glx/apple/apple_glapi.c
@@ -38,6 +38,7 @@
 
 #include <GL/gl.h>
 
+#include "main/glheader.h"
 #include "glapi.h"
 #include "glapitable.h"
 #include "main/dispatch.h"
-- 
cgit v1.1