Fix the option to disable X11 in meson
The Meson script will currently always enable X11 support if it can find the Xlib headers, even if you tell it to disable X11. That is, disabling X11 by specifying -Dx11=disabled
has exactly the same effect as leaving it set to auto
.
So, this changes the script so that if you disable X11, it actually gets disabled. It'll use a dummy dependency, which is an easy way to make it act as if Xlib wasn't available at all.
Also, if X11 support is enabled, then this changes the configure/meson script to set a macro named ENABLE_EGL_X11
instead of USE_X11
.
The macro is only meaningful for EGL, since without X11, GLX doesn't even get built. Also, setting USE_X11
changes the EGLNativeDisplayType
typedef in eglplatform.h
, which we don't want -- libglvnd should treat EGLNativeDisplayType
as a simple void *
.