-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make EGL support optional #123
Conversation
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks generally good, with some minor nitpick.
AS_CASE([$host_os], | ||
[mingw*], [build_egl=no], | ||
[darwin*], [build_egl=no], | ||
[android*], [build_egl=no], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure Android only has EGL, so it should not be listed there.
elif host_system == 'darwin' | ||
build_egl = false | ||
elif host_system == 'android' | ||
build_egl = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above: Android should have EGL built by default.
As an addition, it would be great if your pull request also modified the |
Allow optionally disabling EGL support, just like we allow disabling GLX support. Closes anholt#123
Thanks for working on this! I merged your branch and fixed the issues above. |
Thanks! |
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