summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-05-08 23:12:49 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-05-17 23:41:59 +0200
commit0511fc56e7017209ad18d16551ccaad05de9486c (patch)
treea00b146b6b58204be0f6307b137a6e195e4a05fd /src
parent5ef9c5ea24e5a0761baa2abda46c031eb0f6fd0f (diff)
downloadlibepoxy-0511fc56e7017209ad18d16551ccaad05de9486c.tar.gz
Make EGL support optional
It is perfectly possible to build Mesa3D with just OpenGL support, and use with GLX in X.org, without having EGL/OpenGLES support. However, libepoxy currently unconditionally requires EGL support in its configure.ac, which causes a build failure when Mesa3D only provides full OpenGL support: checking for EGL... no configure: error: Package requirements (egl) were not met: Package egl was not found in the pkg-config search path. Perhaps you should add the directory containing `egl.pc' to the PKG_CONFIG_PATH environment variable Package 'egl', required by 'world', not found This commit fixes that by: - Adjusting the configure.ac to add a --{enable,disable}-egl option handled in the exact same way as --{enable,disable}-glx - Adjusting the meson build logic in the same way. - Adjusting src/dispatch_common.h to define PLATFORM_HAS_EGL correctly, which allows to not include any EGL related header file if EGL support is not enabled. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'src')
-rw-r--r--src/dispatch_common.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dispatch_common.h b/src/dispatch_common.h
index e3277f7..e16771f 100644
--- a/src/dispatch_common.h
+++ b/src/dispatch_common.h
@@ -24,19 +24,19 @@
#include "config.h"
#ifdef _WIN32
-#define PLATFORM_HAS_EGL 0
+#define PLATFORM_HAS_EGL ENABLE_EGL
#define PLATFORM_HAS_GLX ENABLE_GLX
#define PLATFORM_HAS_WGL 1
#elif defined(__APPLE__)
-#define PLATFORM_HAS_EGL 0
+#define PLATFORM_HAS_EGL ENABLE_EGL
#define PLATFORM_HAS_GLX ENABLE_GLX
#define PLATFORM_HAS_WGL 0
#elif defined(ANDROID)
-#define PLATFORM_HAS_EGL 1
+#define PLATFORM_HAS_EGL ENABLE_EGL
#define PLATFORM_HAS_GLX 0
#define PLATFORM_HAS_WGL 0
#else
-#define PLATFORM_HAS_EGL 1
+#define PLATFORM_HAS_EGL ENABLE_EGL
#define PLATFORM_HAS_GLX ENABLE_GLX
#define PLATFORM_HAS_WGL 0
#endif