Merge branch 'fix-x11-config-option' into 'master'
Fix the option to disable X11 in meson See merge request glvnd/libglvnd!258
This commit is contained in:
commit
922b85a94a
|
@ -203,7 +203,7 @@ AX_PTHREAD()
|
||||||
|
|
||||||
if test "x$enable_x11" = "xyes" ; then
|
if test "x$enable_x11" = "xyes" ; then
|
||||||
PKG_CHECK_MODULES([X11], [x11])
|
PKG_CHECK_MODULES([X11], [x11])
|
||||||
AC_DEFINE([USE_X11], 1,
|
AC_DEFINE([ENABLE_EGL_X11], 1,
|
||||||
[Define to 1 if X11 support is enabled.])
|
[Define to 1 if X11 support is enabled.])
|
||||||
fi
|
fi
|
||||||
if test "x$enable_glx" = "xyes" ; then
|
if test "x$enable_glx" = "xyes" ; then
|
||||||
|
|
|
@ -87,10 +87,15 @@ endif
|
||||||
dep_dl = cc.find_library('dl', required : false)
|
dep_dl = cc.find_library('dl', required : false)
|
||||||
dep_m = cc.find_library('m', required : false)
|
dep_m = cc.find_library('m', required : false)
|
||||||
dep_threads = dependency('threads')
|
dep_threads = dependency('threads')
|
||||||
dep_x11 = dependency('x11', required : get_option('x11'))
|
if get_option('x11').disabled()
|
||||||
|
dep_x11 = dependency('', required : false)
|
||||||
|
else
|
||||||
|
dep_x11 = dependency('x11', required : get_option('x11'))
|
||||||
|
endif
|
||||||
|
|
||||||
dep_x11_headers = dep_x11.partial_dependency(compile_args : true, includes : true)
|
dep_x11_headers = dep_x11.partial_dependency(compile_args : true, includes : true)
|
||||||
if dep_x11.found()
|
if dep_x11.found()
|
||||||
add_project_arguments('-DUSE_X11', language : ['c'])
|
add_project_arguments('-DENABLE_EGL_X11', language : ['c'])
|
||||||
endif
|
endif
|
||||||
|
|
||||||
dep_xext = dep_null
|
dep_xext = dep_null
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
||||||
#if defined(USE_X11)
|
#if defined(ENABLE_EGL_X11)
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ static EGLBoolean IsGbmDisplay(void *native_display)
|
||||||
|
|
||||||
static EGLBoolean IsX11Display(void *dpy)
|
static EGLBoolean IsX11Display(void *dpy)
|
||||||
{
|
{
|
||||||
#if defined(USE_X11)
|
#if defined(ENABLE_EGL_X11)
|
||||||
void *alloc;
|
void *alloc;
|
||||||
void *handle;
|
void *handle;
|
||||||
void *XAllocID = NULL;
|
void *XAllocID = NULL;
|
||||||
|
@ -193,9 +193,9 @@ static EGLBoolean IsX11Display(void *dpy)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (XAllocID != NULL && XAllocID == alloc);
|
return (XAllocID != NULL && XAllocID == alloc);
|
||||||
#else // defined(USE_X11)
|
#else // defined(ENABLE_EGL_X11)
|
||||||
return EGL_FALSE;
|
return EGL_FALSE;
|
||||||
#endif // defined(USE_X11)
|
#endif // defined(ENABLE_EGL_X11)
|
||||||
}
|
}
|
||||||
|
|
||||||
static EGLBoolean IsWaylandDisplay(void *native_display)
|
static EGLBoolean IsWaylandDisplay(void *native_display)
|
||||||
|
|
|
@ -50,7 +50,7 @@ if get_option('egl')
|
||||||
c_args : ['-DDUMMY_VENDOR_NAME="dummy@0@"'.format(v)],
|
c_args : ['-DDUMMY_VENDOR_NAME="dummy@0@"'.format(v)],
|
||||||
include_directories : [inc_include],
|
include_directories : [inc_include],
|
||||||
link_with: [libpatchentrypoints],
|
link_with: [libpatchentrypoints],
|
||||||
dependencies : [idep_glvnd_pthread, dep_x11_headers],
|
dependencies : [idep_glvnd_pthread],
|
||||||
version : '0',
|
version : '0',
|
||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
@ -208,7 +208,7 @@ if get_option('egl')
|
||||||
['test@0@.c'.format(t[0]), 'egl_test_utils.c'],
|
['test@0@.c'.format(t[0]), 'egl_test_utils.c'],
|
||||||
include_directories : [inc_include],
|
include_directories : [inc_include],
|
||||||
link_with : [libEGL, t[1]],
|
link_with : [libEGL, t[1]],
|
||||||
dependencies : [t[2], dep_x11_headers],
|
dependencies : [t[2]],
|
||||||
),
|
),
|
||||||
env : env_egl,
|
env : env_egl,
|
||||||
suite : ['egl'],
|
suite : ['egl'],
|
||||||
|
|
Loading…
Reference in a new issue