Conditionalize building the EGL and GLX dispatch code.

macos/v1.5.9
Eric Anholt 11 years ago
parent 0d7d26537d
commit 906d5b6e3a
  1. 2
      configure.ac
  2. 12
      src/Makefile.am
  3. 5
      src/dispatch_common.c
  4. 15
      src/dispatch_common.h

@ -96,4 +96,6 @@ AC_CONFIG_FILES([
]) ])
AC_OUTPUT AC_OUTPUT
echo " EGL: $build_egl"
echo " GLX: $build_glx"
echo " PYTHON: $PYTHON" echo " PYTHON: $PYTHON"

@ -88,9 +88,19 @@ CLEANFILES = $(BUILT_SOURCES)
libepoxy_la_SOURCES = \ libepoxy_la_SOURCES = \
dispatch_common.c \ dispatch_common.c \
dispatch_common.h \ dispatch_common.h \
$(BUILT_SOURCES) $(GENERATED_GL) \
$(BUILD_GENERATED_EGL) \
$(BUILD_GENERATED_GLX) \
$() $()
if BUILD_EGL
BUILD_GENERATED_EGL = $(GENERATED_EGL)
endif
if BUILD_GLX
BUILD_GENERATED_GLX = $(GENERATED_GLX)
endif
# These are generated alongside the .c file. # These are generated alongside the .c file.
$(GENERATED_GL_INCLUDES): $(GENERATED_GL_SOURCE) $(GENERATED_GL_INCLUDES): $(GENERATED_GL_SOURCE)
$(GENERATED_GLX_INCLUDES): $(GENERATED_GLX_SOURCE) $(GENERATED_GLX_INCLUDES): $(GENERATED_GLX_SOURCE)

@ -95,9 +95,14 @@
#include <stdio.h> #include <stdio.h>
#include <pthread.h> #include <pthread.h>
#include <err.h> #include <err.h>
#include "epoxy/gl.h" #include "epoxy/gl.h"
#if PLATFORM_HAS_GLX
#include "epoxy/glx.h" #include "epoxy/glx.h"
#endif
#if PLATFORM_HAS_EGL
#include "epoxy/egl.h" #include "epoxy/egl.h"
#endif
#include "dispatch_common.h" #include "dispatch_common.h"
struct api { struct api {

@ -22,9 +22,22 @@
*/ */
#include <stdbool.h> #include <stdbool.h>
#ifdef _WIN32
#define PLATFORM_HAS_EGL 0
#define PLATFORM_HAS_GLX 0
#else
#define PLATFORM_HAS_EGL 1
#define PLATFORM_HAS_GLX 1
#endif
#include "epoxy/gl.h" #include "epoxy/gl.h"
#include "epoxy/egl.h" #if PLATFORM_HAS_GLX
#include "epoxy/glx.h" #include "epoxy/glx.h"
#endif
#if PLATFORM_HAS_EGL
#include "epoxy/egl.h"
#endif
#ifndef PUBLIC #ifndef PUBLIC
# if (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) # if (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))

Loading…
Cancel
Save