Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
project('xserver', 'c',
|
2017-09-27 20:31:37 +02:00
|
|
|
default_options: [
|
|
|
|
'buildtype=debugoptimized',
|
|
|
|
'c_std=gnu99',
|
|
|
|
],
|
2018-05-14 20:08:01 +02:00
|
|
|
version: '1.20.99.1',
|
2019-03-05 17:31:29 +01:00
|
|
|
meson_version: '>= 0.46.0',
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
)
|
2019-04-18 18:06:41 +02:00
|
|
|
add_project_arguments('-DHAVE_DIX_CONFIG_H', language: ['c', 'objc'])
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
|
|
|
|
add_global_arguments('-fno-strict-aliasing', language : 'c')
|
|
|
|
add_global_arguments('-fvisibility=hidden', language : 'c')
|
|
|
|
|
|
|
|
add_global_link_arguments('-fvisibility=hidden', language : 'c')
|
|
|
|
|
2017-09-27 20:31:39 +02:00
|
|
|
if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
|
|
|
|
test_wflags = [
|
|
|
|
'-Wall',
|
|
|
|
'-Wpointer-arith',
|
|
|
|
'-Wmissing-declarations',
|
|
|
|
'-Wformat=2',
|
|
|
|
'-Wstrict-prototypes',
|
|
|
|
'-Wmissing-prototypes',
|
|
|
|
'-Wnested-externs',
|
|
|
|
'-Wbad-function-cast',
|
|
|
|
'-Wold-style-definition',
|
|
|
|
'-Wunused',
|
|
|
|
'-Wuninitialized',
|
|
|
|
'-Wshadow',
|
|
|
|
'-Wmissing-noreturn',
|
|
|
|
'-Wmissing-format-attribute',
|
|
|
|
'-Wredundant-decls',
|
|
|
|
'-Werror=implicit',
|
|
|
|
'-Werror=nonnull',
|
|
|
|
'-Werror=init-self',
|
|
|
|
'-Werror=main',
|
|
|
|
'-Werror=missing-braces',
|
|
|
|
'-Werror=sequence-point',
|
|
|
|
'-Werror=return-type',
|
|
|
|
'-Werror=trigraphs',
|
|
|
|
'-Werror=array-bounds',
|
|
|
|
'-Werror=write-strings',
|
|
|
|
'-Werror=address',
|
|
|
|
'-Werror=int-to-pointer-cast',
|
|
|
|
'-Werror=pointer-to-int-cast',
|
|
|
|
]
|
|
|
|
else
|
|
|
|
test_wflags = []
|
|
|
|
endif
|
|
|
|
|
|
|
|
common_wflags = []
|
|
|
|
foreach wflag: test_wflags
|
|
|
|
if cc.has_argument(wflag)
|
|
|
|
common_wflags += [ wflag ]
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
2019-04-18 18:06:41 +02:00
|
|
|
add_global_arguments(common_wflags, language : ['c', 'objc'])
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
|
2019-08-01 09:48:59 +02:00
|
|
|
libdrm_req = '>= 2.4.89'
|
|
|
|
libselinux_req = '>= 2.0.86'
|
|
|
|
xext_req = '>= 1.0.99.4'
|
|
|
|
wayland_req = '>= 1.3.0'
|
2019-09-02 21:42:17 +02:00
|
|
|
wayland_protocols_req = '>= 1.18'
|
2019-08-01 09:48:59 +02:00
|
|
|
gbm_req = '>= 10.2'
|
|
|
|
xf86dgaproto_req = '>= 2.0.99.1'
|
|
|
|
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
xproto_dep = dependency('xproto', version: '>= 7.0.31')
|
2018-02-12 22:51:53 +01:00
|
|
|
randrproto_dep = dependency('randrproto', version: '>= 1.6.0')
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
renderproto_dep = dependency('renderproto', version: '>= 0.11')
|
|
|
|
xextproto_dep = dependency('xextproto', version: '>= 7.2.99.901')
|
|
|
|
inputproto_dep = dependency('inputproto', version: '>= 2.3')
|
|
|
|
kbproto_dep = dependency('kbproto', version: '>= 1.0.3')
|
|
|
|
fontsproto_dep = dependency('fontsproto', version: '>= 2.1.3')
|
|
|
|
fixesproto_dep = dependency('fixesproto', version: '>= 5.0')
|
|
|
|
damageproto_dep = dependency('damageproto', version: '>= 1.1')
|
|
|
|
xcmiscproto_dep = dependency('xcmiscproto', version: '>= 1.2.0')
|
|
|
|
bigreqsproto_dep = dependency('bigreqsproto', version: '>= 1.1.0')
|
|
|
|
xtrans_dep = dependency('xtrans', version: '>= 1.3.5')
|
|
|
|
|
|
|
|
videoproto_dep = dependency('videoproto')
|
|
|
|
compositeproto_dep = dependency('compositeproto', version: '>= 0.4')
|
|
|
|
recordproto_dep = dependency('recordproto', version: '>= 1.13.99.1')
|
|
|
|
scrnsaverproto_dep = dependency('scrnsaverproto', version: '>= 1.1')
|
|
|
|
resourceproto_dep = dependency('resourceproto', version: '>= 1.2.0')
|
2017-10-24 19:03:09 +02:00
|
|
|
xf86driproto_dep = dependency('xf86driproto', version: '>= 2.1.0', required: get_option('dri1') == 'true')
|
|
|
|
dri2proto_dep = dependency('dri2proto', version: '>= 2.8', required: get_option('dri2') == 'true')
|
2018-02-28 02:19:35 +01:00
|
|
|
dri3proto_dep = dependency('dri3proto', version: '>= 1.2', required: get_option('dri3') == 'true')
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
xineramaproto_dep = dependency('xineramaproto')
|
2019-09-11 02:28:36 +02:00
|
|
|
xf86bigfontproto_dep = dependency('xf86bigfontproto', version: '>= 1.2.0', required: get_option('xf86bigfont'))
|
2018-08-08 01:23:14 +02:00
|
|
|
xf86vidmodeproto_dep = dependency('xf86vidmodeproto', version: '>= 2.2.99.1')
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
applewmproto_dep = dependency('applewmproto', version: '>= 1.4', required: false)
|
2017-05-09 13:23:48 +02:00
|
|
|
xshmfence_dep = dependency('xshmfence', version: '>= 1.1', required: false)
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
|
|
|
|
pixman_dep = dependency('pixman-1')
|
|
|
|
libbsd_dep = dependency('libbsd', required: false)
|
2017-11-06 18:56:05 +01:00
|
|
|
xkbcomp_dep = dependency('xkbcomp', required: false)
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
xkbfile_dep = dependency('xkbfile')
|
|
|
|
xfont2_dep = dependency('xfont2', version: '>= 2.0')
|
2017-05-08 12:40:17 +02:00
|
|
|
nettle_dep = dependency('nettle')
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
|
2017-10-24 19:03:09 +02:00
|
|
|
dbus_required = get_option('systemd_logind') == 'true'
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
dbus_dep = dependency('dbus-1', version: '>= 1.0', required: dbus_required)
|
|
|
|
|
2018-08-08 01:23:19 +02:00
|
|
|
# libsystemd-daemon was moved into libsystemd in version 209
|
|
|
|
libsystemd_daemon_dep = dependency('libsystemd', version: '>= 209', required: false)
|
|
|
|
if not libsystemd_daemon_dep.found()
|
|
|
|
libsystemd_daemon_dep = dependency('libsystemd-daemon', required: false)
|
|
|
|
endif
|
|
|
|
|
2018-04-19 00:09:15 +02:00
|
|
|
build_hashtable = false
|
|
|
|
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
# Resolve default values of some options
|
|
|
|
xkb_dir = get_option('xkb_dir')
|
|
|
|
if xkb_dir == ''
|
2019-03-14 18:15:52 +01:00
|
|
|
if xkbcomp_dep.found() and xkbcomp_dep.type_name() == 'pkgconfig'
|
|
|
|
xkb_dir = xkbcomp_dep.get_pkgconfig_variable('xkbconfigdir')
|
|
|
|
endif
|
2017-11-06 18:56:05 +01:00
|
|
|
if xkb_dir == ''
|
|
|
|
xkb_dir = join_paths(get_option('prefix'), 'share/X11/xkb')
|
|
|
|
endif
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
xkb_output_dir = get_option('xkb_output_dir')
|
|
|
|
if xkb_output_dir == ''
|
2017-11-06 18:56:05 +01:00
|
|
|
xkb_output_dir = join_paths(xkb_dir, 'compiled')
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
endif
|
|
|
|
|
2017-10-12 00:03:45 +02:00
|
|
|
xkb_bin_dir = get_option('xkb_bin_dir')
|
|
|
|
if xkb_bin_dir == ''
|
2019-03-14 18:15:52 +01:00
|
|
|
if xkbcomp_dep.found() and xkbcomp_dep.type_name() == 'pkgconfig'
|
|
|
|
xkb_bin_dir = xkbcomp_dep.get_pkgconfig_variable('bindir')
|
|
|
|
endif
|
2017-11-06 18:56:05 +01:00
|
|
|
if xkb_bin_dir == ''
|
|
|
|
xkb_bin_dir = join_paths(get_option('prefix'), get_option('bindir'))
|
|
|
|
endif
|
2017-10-12 00:03:45 +02:00
|
|
|
endif
|
|
|
|
|
2018-03-26 20:57:07 +02:00
|
|
|
dfp = get_option('default_font_path')
|
|
|
|
if dfp == ''
|
|
|
|
fontutil_dep = dependency('fontutil')
|
|
|
|
fontrootdir = fontutil_dep.get_pkgconfig_variable('fontrootdir')
|
2019-04-18 18:06:41 +02:00
|
|
|
dfp_elements = [
|
2018-03-26 20:57:07 +02:00
|
|
|
join_paths(fontrootdir, 'misc'),
|
|
|
|
join_paths(fontrootdir, 'TTF'),
|
|
|
|
join_paths(fontrootdir, 'OTF'),
|
|
|
|
join_paths(fontrootdir, 'Type1'),
|
|
|
|
join_paths(fontrootdir, '100dpi'),
|
|
|
|
join_paths(fontrootdir, '75dpi'),
|
2019-04-18 18:06:41 +02:00
|
|
|
]
|
|
|
|
if host_machine.system() == 'darwin'
|
|
|
|
dfp_elements += [
|
|
|
|
'/Library/Fonts',
|
|
|
|
'/System/Library/Fonts',
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
default_font_path = ','.join(dfp_elements)
|
2018-03-26 20:57:07 +02:00
|
|
|
else
|
|
|
|
default_font_path = dfp
|
|
|
|
endif
|
|
|
|
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
hal_option = get_option('hal')
|
|
|
|
glamor_option = get_option('glamor')
|
|
|
|
|
|
|
|
build_udev = get_option('udev')
|
2019-04-18 18:06:41 +02:00
|
|
|
if host_machine.system() == 'windows' or host_machine.system() == 'darwin'
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
build_udev = false
|
2017-10-24 19:03:09 +02:00
|
|
|
hal_option = 'false'
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('systemd_logind') == 'auto'
|
2017-05-08 12:40:21 +02:00
|
|
|
build_systemd_logind = build_udev and dbus_dep.found()
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
else
|
2017-10-24 19:03:09 +02:00
|
|
|
build_systemd_logind = get_option('systemd_logind') == 'true'
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
endif
|
|
|
|
|
2019-08-27 21:54:42 +02:00
|
|
|
with_dtrace = get_option('dtrace')
|
|
|
|
if with_dtrace
|
|
|
|
dtrace = find_program('dtrace', required: true)
|
|
|
|
endif
|
|
|
|
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
build_xorg = false
|
|
|
|
if (host_machine.system() != 'darwin' and
|
|
|
|
host_machine.system() != 'windows')
|
|
|
|
if get_option('xorg') == 'auto'
|
|
|
|
build_xorg = (host_machine.system() != 'darwin' and
|
|
|
|
host_machine.system() != 'windows')
|
|
|
|
else
|
2017-10-24 19:03:09 +02:00
|
|
|
build_xorg = get_option('xorg') == 'true'
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
xorgsdkdir = join_paths(get_option('prefix'), get_option('includedir'), 'xorg')
|
|
|
|
|
|
|
|
build_xwayland = false
|
|
|
|
if (host_machine.system() != 'darwin' and
|
|
|
|
host_machine.system() != 'windows')
|
2017-10-24 19:03:09 +02:00
|
|
|
if get_option('xwayland') != 'false'
|
|
|
|
xwayland_required = get_option('xwayland') == 'true'
|
2019-08-01 13:34:13 +02:00
|
|
|
build_glamor = glamor_option == 'true' or glamor_option == 'auto'
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
|
|
|
|
xwayland_dep = [
|
2019-08-01 09:48:59 +02:00
|
|
|
dependency('wayland-client', version: wayland_req, required: xwayland_required),
|
|
|
|
dependency('wayland-protocols', version: wayland_protocols_req, required: xwayland_required),
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
]
|
|
|
|
|
2019-08-01 13:34:13 +02:00
|
|
|
if build_glamor
|
|
|
|
xwayland_dep += dependency('libdrm', version: libdrm_req, required: xwayland_required)
|
|
|
|
xwayland_dep += dependency('epoxy', required: xwayland_required)
|
|
|
|
endif
|
|
|
|
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
build_xwayland = true
|
|
|
|
# check for all the deps being found, to handle 'auto' mode.
|
|
|
|
foreach d: xwayland_dep
|
|
|
|
if not d.found()
|
|
|
|
build_xwayland = false
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
build_xnest = false
|
|
|
|
if (host_machine.system() != 'darwin' and
|
|
|
|
host_machine.system() != 'windows')
|
2017-10-24 19:03:09 +02:00
|
|
|
if get_option('xnest') != 'false'
|
|
|
|
xnest_required = get_option('xnest') == 'true'
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
|
|
|
|
xnest_dep = [
|
2019-08-01 09:48:59 +02:00
|
|
|
dependency('xext', version: xext_req, required: xnest_required),
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
dependency('x11', required: xnest_required),
|
|
|
|
dependency('xau', required: xnest_required),
|
|
|
|
]
|
|
|
|
|
|
|
|
build_xnest = true
|
|
|
|
# check for all the deps being found, to handle 'auto' mode.
|
|
|
|
foreach d: xnest_dep
|
|
|
|
if not d.found()
|
|
|
|
build_xnest = false
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2017-05-07 21:53:04 +02:00
|
|
|
build_xwin = false
|
|
|
|
if get_option('xwin') == 'auto'
|
|
|
|
if (host_machine.system() == 'cygwin' or
|
|
|
|
host_machine.system() == 'windows')
|
|
|
|
build_xwin = true
|
|
|
|
endif
|
|
|
|
else
|
2017-10-24 19:03:09 +02:00
|
|
|
build_xwin = get_option('xwin') == 'true'
|
2017-05-07 21:53:04 +02:00
|
|
|
endif
|
|
|
|
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
build_xquartz = false
|
2019-04-18 18:06:41 +02:00
|
|
|
if get_option('xquartz') == 'auto'
|
|
|
|
if host_machine.system() == 'darwin'
|
|
|
|
build_xquartz = true
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
build_xquartz = get_option('xquartz') == 'true'
|
|
|
|
endif
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
|
2019-04-19 15:01:48 +02:00
|
|
|
build_rootless = false
|
|
|
|
if build_xquartz
|
|
|
|
build_rootless = true
|
|
|
|
endif
|
|
|
|
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
if get_option('ipv6') == 'auto'
|
|
|
|
build_ipv6 = cc.has_function('getaddrinfo')
|
|
|
|
else
|
2017-10-24 19:03:09 +02:00
|
|
|
build_ipv6 = get_option('ipv6') == 'true'
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
int10 = get_option('int10')
|
|
|
|
if int10 == 'auto'
|
|
|
|
int10 = 'x86emu'
|
|
|
|
if host_machine.cpu() == 'powerpc' and host_machine.system() == 'freebsd'
|
|
|
|
int10 = 'stub'
|
|
|
|
endif
|
|
|
|
if host_machine.cpu() == 'arm'
|
|
|
|
int10 = 'stub'
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2017-10-23 22:21:19 +02:00
|
|
|
hal_dep = []
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
if hal_option == 'auto'
|
|
|
|
if not build_udev
|
|
|
|
hal_dep = dependency('hal', required: false)
|
|
|
|
build_hal = hal_dep.found()
|
|
|
|
else
|
|
|
|
build_hal = false
|
|
|
|
endif
|
|
|
|
else
|
2017-10-24 19:03:09 +02:00
|
|
|
build_hal = hal_option == 'true'
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
if build_hal
|
|
|
|
hal_dep = dependency('hal')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
if build_udev and build_hal
|
|
|
|
error('Hotplugging through both libudev and hal not allowed')
|
|
|
|
endif
|
|
|
|
|
2017-05-08 12:40:21 +02:00
|
|
|
build_dbus = build_hal or build_systemd_logind
|
|
|
|
|
2017-05-08 12:40:22 +02:00
|
|
|
udev_dep = dependency('', required:false)
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
if build_udev
|
|
|
|
udev_dep = dependency('libudev', version: '>= 143')
|
|
|
|
endif
|
|
|
|
|
|
|
|
log_dir = get_option('log_dir')
|
|
|
|
if log_dir == ''
|
|
|
|
log_dir = join_paths(get_option('prefix'), get_option('localstatedir'), 'log')
|
|
|
|
endif
|
|
|
|
|
2018-05-02 21:54:26 +02:00
|
|
|
module_dir = join_paths(get_option('libdir'), get_option('module_dir'))
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
|
|
|
|
if glamor_option == 'auto'
|
2017-04-27 18:52:29 +02:00
|
|
|
build_glamor = build_xorg or build_xwayland
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
else
|
2019-08-01 13:34:13 +02:00
|
|
|
build_glamor = glamor_option == 'true'
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
endif
|
|
|
|
|
2018-02-28 02:19:44 +01:00
|
|
|
gbm_dep = dependency('', required: false)
|
|
|
|
epoxy_dep = dependency('', required: false)
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
if build_glamor
|
2019-08-01 09:48:59 +02:00
|
|
|
gbm_dep = dependency('gbm', version: gbm_req, required: false)
|
2018-02-28 02:19:44 +01:00
|
|
|
epoxy_dep = dependency('epoxy', required: false)
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
endif
|
|
|
|
|
xwayland: Add glamor egl_backend for EGLStreams
This adds initial support for displaying Xwayland applications through
the use of EGLStreams and nvidia's custom wayland protocol by adding
another egl_backend driver. This also adds some additional egl_backend
hooks that are required to make things work properly.
EGLStreams work a lot differently then the traditional way of handling
buffers with wayland. Unfortunately, there are also a LOT of various
pitfalls baked into it's design that need to be explained.
This has a very large and unfortunate implication: direct rendering is,
for the time being at least, impossible to do through EGLStreams. The
main reason being that the EGLStream spec mandates that we lose the
entire color buffer contents with each eglSwapBuffers(), which goes
against X's requirement of not losing data with pixmaps. no way to use
an allocated EGLSurface as the storage for glamor rendering like we do
with GBM, we have to rely on blitting each pixmap to it's respective
EGLSurface producer each frame. In order to pull this off, we add two
different additional egl_backend hooks that GBM opts out of
implementing:
- egl_backend.allow_commits for holding off displaying any EGLStream
backed pixmaps until the point where it's stream is completely
initialized and ready for use
- egl_backend.post_damage for blitting the content of the EGLStream
surface producer before Xwayland actually damages and commits the
wl_surface to the screen.
The other big pitfall here is that using nvidia's wayland-eglstreams
helper library is also not possible for the most part. All of it's API
for creating and destroying streams rely on being able to perform a
roundtrip in order to bring each stream to completion since the wayland
compositor must perform it's job of connecting a consumer to each
EGLstream. Because Xwayland has to potentially handle both responding to
the wayland compositor and it's own X clients, the situation of the
wayland compositor being one of our X clients must be considered. If we
perform a roundtrip with the Wayland compositor, it's possible that the
wayland compositor might currently be connected to us as an X client and
thus hang while both Xwayland and the wayland compositor await responses
from eachother. To avoid this, we work directly with the wayland
protocol and use wl_display_sync() events along with release() events to
set up and destroy EGLStreams asynchronously alongside handling X
clients.
Additionally, since setting up EGLStreams is not an atomic operation we
have to take into consideration the fact that an EGLStream can
potentially be created in response to a window resize, then immediately
deleted due to another pending window resize in the same X client's
pending reqests before Xwayland hits the part of it's event loop where
we read from the wayland compositor. To make this even more painful, we
also have to take into consideration that since EGLStreams are not
atomic that it's possible we could delete wayland resources for an
EGLStream before the compositor even finishes using them and thus run
into errors. So, we use quite a bit of tracking logic to keep EGLStream
objects alive until we know the compositor isn't using them (even if
this means the stream outlives the pixmap it backed).
While the default backend for glamor remains GBM, this patch exists for
users who have had to deal with the reprecussion of their GPU
manufacturers ignoring the advice of upstream and the standardization of
GBM across most major GPU manufacturers. It is not intended to be a
final solution to the GBM debate, but merely a baindaid so our users
don't have to suffer from the consequences of companies avoiding working
upstream. New drivers are strongly encouraged not to use this as a
backend, and use GBM like everyone else. We even spit this out as an
error from Xwayland when using the eglstream backend.
Signed-off-by: Lyude Paul <lyude@redhat.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-04-20 20:38:05 +02:00
|
|
|
eglstream_option = get_option('xwayland_eglstream')
|
|
|
|
if build_xwayland and build_glamor
|
|
|
|
eglstream_dep = dependency('wayland-eglstream-protocols', required:false)
|
|
|
|
if eglstream_option == 'auto'
|
|
|
|
build_eglstream = eglstream_dep.found()
|
|
|
|
else
|
|
|
|
build_eglstream = eglstream_option == 'true'
|
|
|
|
if build_eglstream and not eglstream_dep.found()
|
|
|
|
error('glamor EGLStream support requested, but wayland-eglstream-protocols not found')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
build_eglstream = false
|
|
|
|
endif
|
|
|
|
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
# XXX: Add more sha1 options, because Linux is about choice
|
|
|
|
sha1_dep = nettle_dep
|
|
|
|
|
2018-03-28 14:04:32 +02:00
|
|
|
xdmcp_dep = dependency('', required : false)
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
if get_option('xdmcp')
|
|
|
|
xdmcp_dep = dependency('xdmcp')
|
|
|
|
endif
|
|
|
|
|
2018-03-28 14:04:32 +02:00
|
|
|
has_xdm_auth = get_option('xdm-auth-1')
|
|
|
|
|
|
|
|
if not xdmcp_dep.found()
|
|
|
|
has_xdm_auth = false
|
|
|
|
endif
|
|
|
|
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
build_glx = get_option('glx')
|
2018-04-19 00:09:15 +02:00
|
|
|
if build_glx
|
|
|
|
build_hashtable = true
|
|
|
|
endif
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
|
2019-08-01 09:48:59 +02:00
|
|
|
libdrm_dep = dependency('libdrm', version: libdrm_req, required: false)
|
2018-03-08 13:34:26 +01:00
|
|
|
|
2017-05-09 13:23:48 +02:00
|
|
|
if get_option('dri1') == 'auto'
|
2018-03-08 13:34:26 +01:00
|
|
|
build_dri1 = xf86driproto_dep.found() and libdrm_dep.found()
|
2017-05-09 13:23:48 +02:00
|
|
|
else
|
2017-10-24 19:03:09 +02:00
|
|
|
build_dri1 = get_option('dri1') == 'true'
|
2017-05-09 13:23:48 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('dri2') == 'auto'
|
2018-03-08 13:34:26 +01:00
|
|
|
build_dri2 = dri2proto_dep.found() and libdrm_dep.found()
|
2017-05-09 13:23:48 +02:00
|
|
|
else
|
2017-10-24 19:03:09 +02:00
|
|
|
build_dri2 = get_option('dri2') == 'true'
|
2017-05-09 13:23:48 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('dri3') == 'auto'
|
2018-03-08 13:34:26 +01:00
|
|
|
build_dri3 = dri3proto_dep.found() and xshmfence_dep.found() and libdrm_dep.found()
|
2017-05-09 13:23:48 +02:00
|
|
|
else
|
2017-10-24 19:03:09 +02:00
|
|
|
build_dri3 = get_option('dri3') == 'true'
|
2017-05-09 13:23:48 +02:00
|
|
|
if build_dri3
|
|
|
|
if not xshmfence_dep.found()
|
|
|
|
error('DRI3 requested, but xshmfence not found')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2018-03-08 13:34:26 +01:00
|
|
|
libdrm_required = build_dri1 or build_dri2 or build_dri3
|
|
|
|
if not libdrm_dep.found() and libdrm_required
|
|
|
|
error('DRI requested, but LIBDRM not found')
|
|
|
|
endif
|
|
|
|
|
2018-03-03 02:05:04 +01:00
|
|
|
build_modesetting = libdrm_dep.found()
|
2017-05-09 13:23:48 +02:00
|
|
|
|
2017-06-17 15:32:30 +02:00
|
|
|
build_vbe = false
|
|
|
|
if get_option('vbe') == 'auto'
|
|
|
|
if (host_machine.system() != 'darwin' and
|
|
|
|
host_machine.system() != 'windows' and
|
|
|
|
host_machine.system() != 'cygwin')
|
|
|
|
build_vbe = true
|
|
|
|
endif
|
|
|
|
else
|
2017-10-24 19:03:09 +02:00
|
|
|
build_vbe = get_option('vbe') == 'true'
|
2017-06-17 15:32:30 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
build_vgahw = false
|
|
|
|
if get_option('vgahw') == 'auto'
|
|
|
|
if (host_machine.system() != 'darwin' and
|
|
|
|
host_machine.system() != 'windows' and
|
|
|
|
host_machine.system() != 'cygwin')
|
|
|
|
build_vgahw = true
|
|
|
|
endif
|
|
|
|
else
|
2017-10-24 19:03:09 +02:00
|
|
|
build_vgahw = get_option('vgahw') == 'true'
|
2017-06-17 15:32:30 +02:00
|
|
|
endif
|
|
|
|
|
2018-02-13 22:33:49 +01:00
|
|
|
build_dpms = get_option('dpms')
|
|
|
|
if build_xquartz
|
|
|
|
build_dpms = false
|
|
|
|
endif
|
|
|
|
|
2018-02-13 22:33:50 +01:00
|
|
|
build_xf86bigfont = get_option('xf86bigfont')
|
|
|
|
build_screensaver = get_option('screensaver')
|
|
|
|
build_res = get_option('xres')
|
2018-04-19 00:09:15 +02:00
|
|
|
if build_res
|
|
|
|
build_hashtable = true
|
|
|
|
endif
|
|
|
|
|
2018-02-13 22:33:50 +01:00
|
|
|
build_xace = get_option('xace')
|
|
|
|
build_xinerama = get_option('xinerama')
|
|
|
|
|
2018-02-13 22:33:51 +01:00
|
|
|
build_xsecurity = get_option('xcsecurity')
|
|
|
|
if build_xsecurity
|
|
|
|
if not build_xace
|
|
|
|
error('cannot build Security extension without X-ACE')
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2018-02-18 10:58:33 +01:00
|
|
|
build_xv = get_option('xv')
|
|
|
|
build_xvmc = get_option('xvmc')
|
|
|
|
if not build_xv
|
|
|
|
build_xvmc = false
|
|
|
|
endif
|
|
|
|
|
2018-02-18 10:58:35 +01:00
|
|
|
build_dga = false
|
2018-09-06 22:40:06 +02:00
|
|
|
xf86dgaproto_dep = dependency('', required: false)
|
2018-02-18 10:58:35 +01:00
|
|
|
if get_option('dga') == 'auto'
|
2019-08-01 09:48:59 +02:00
|
|
|
xf86dgaproto_dep = dependency('xf86dgaproto', version: xf86dgaproto_req, required: false)
|
2018-02-18 10:58:35 +01:00
|
|
|
if xf86dgaproto_dep.found()
|
|
|
|
build_dga = true
|
|
|
|
endif
|
|
|
|
elif get_option('dga') == 'true'
|
2019-08-01 09:48:59 +02:00
|
|
|
xf86dgaproto_dep = dependency('xf86dgaproto', version: xf86dgaproto_req, required: true)
|
2018-02-18 10:58:35 +01:00
|
|
|
build_dga = true
|
|
|
|
endif
|
|
|
|
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
build_apm = false
|
2018-03-01 12:55:11 +01:00
|
|
|
if (get_option('linux_apm') == true and
|
|
|
|
host_machine.system() == 'linux')
|
|
|
|
if cc.has_header('linux/apm_bios.h')
|
|
|
|
build_apm = true
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
build_acpi = false
|
2018-03-01 12:56:28 +01:00
|
|
|
if (get_option('linux_acpi') == true and
|
|
|
|
host_machine.system() == 'linux')
|
|
|
|
if (host_machine.cpu() == 'x86' or
|
|
|
|
host_machine.cpu() == 'x86_64' or
|
|
|
|
host_machine.cpu() == 'ia64')
|
|
|
|
build_acpi = true
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2018-03-01 12:58:16 +01:00
|
|
|
build_mitshm = false
|
|
|
|
if get_option('mitshm') == 'auto'
|
|
|
|
build_mitshm = cc.has_header('sys/shm.h')
|
|
|
|
elif get_option('mitshm') == 'true'
|
|
|
|
build_mitshm = true
|
|
|
|
endif
|
|
|
|
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
m_dep = cc.find_library('m', required : false)
|
|
|
|
dl_dep = cc.find_library('dl', required : false)
|
|
|
|
|
|
|
|
common_dep = [
|
|
|
|
xproto_dep,
|
|
|
|
randrproto_dep,
|
|
|
|
renderproto_dep,
|
|
|
|
xextproto_dep,
|
|
|
|
inputproto_dep,
|
|
|
|
kbproto_dep,
|
|
|
|
fontsproto_dep,
|
|
|
|
fixesproto_dep,
|
|
|
|
damageproto_dep,
|
|
|
|
xcmiscproto_dep,
|
|
|
|
bigreqsproto_dep,
|
|
|
|
xtrans_dep,
|
2018-08-08 01:23:19 +02:00
|
|
|
libsystemd_daemon_dep,
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
|
|
|
|
videoproto_dep,
|
|
|
|
compositeproto_dep,
|
|
|
|
recordproto_dep,
|
|
|
|
scrnsaverproto_dep,
|
|
|
|
resourceproto_dep,
|
|
|
|
xf86driproto_dep,
|
|
|
|
dri2proto_dep,
|
|
|
|
dri3proto_dep,
|
|
|
|
xineramaproto_dep,
|
|
|
|
xf86bigfontproto_dep,
|
|
|
|
xf86dgaproto_dep,
|
|
|
|
xf86vidmodeproto_dep,
|
|
|
|
applewmproto_dep,
|
|
|
|
|
|
|
|
pixman_dep,
|
|
|
|
libbsd_dep,
|
|
|
|
xkbfile_dep,
|
|
|
|
xfont2_dep,
|
|
|
|
xdmcp_dep,
|
|
|
|
]
|
|
|
|
|
|
|
|
inc = include_directories(
|
|
|
|
'Xext',
|
|
|
|
'Xi',
|
|
|
|
'composite',
|
|
|
|
'damageext',
|
|
|
|
'exa',
|
|
|
|
'fb',
|
|
|
|
'glamor',
|
|
|
|
'mi',
|
|
|
|
'miext/damage',
|
|
|
|
'miext/shadow',
|
|
|
|
'miext/sync',
|
|
|
|
'dbe',
|
|
|
|
'dri3',
|
|
|
|
'include',
|
|
|
|
'present',
|
|
|
|
'randr',
|
|
|
|
'render',
|
|
|
|
'xfixes',
|
|
|
|
)
|
|
|
|
|
2018-08-09 22:02:41 +02:00
|
|
|
build_xselinux = false
|
|
|
|
if get_option('xselinux') != 'false'
|
2019-08-01 09:48:59 +02:00
|
|
|
dep_selinux = dependency('libselinux', version: libselinux_req,
|
2018-08-09 22:02:41 +02:00
|
|
|
required: get_option('xselinux') == 'true')
|
|
|
|
dep_audit = dependency('audit', required: get_option('xselinux') == 'true')
|
|
|
|
if get_option('xselinux') == 'true'
|
|
|
|
build_xselinux = true
|
|
|
|
else
|
|
|
|
build_xselinux = dep_selinux.found() and dep_audit.found()
|
|
|
|
endif
|
|
|
|
|
|
|
|
if build_xselinux
|
|
|
|
common_dep += dep_selinux
|
|
|
|
common_dep += dep_audit
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2019-04-26 01:46:09 +02:00
|
|
|
socket_dep = []
|
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
socket_dep = meson.get_compiler('c').find_library('ws2_32')
|
|
|
|
common_dep += socket_dep
|
|
|
|
endif
|
|
|
|
|
2017-04-27 18:50:13 +02:00
|
|
|
glx_inc = include_directories('glx')
|
|
|
|
|
2019-04-20 13:45:11 +02:00
|
|
|
top_dir_inc = include_directories('.')
|
2017-05-07 21:53:04 +02:00
|
|
|
|
2018-03-27 00:42:54 +02:00
|
|
|
serverconfigdir = join_paths(get_option('libdir'), 'xorg')
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
|
2018-03-27 00:42:57 +02:00
|
|
|
manpage_config = configuration_data()
|
2018-05-13 20:36:05 +02:00
|
|
|
manpage_config.set('vendorversion', '"xorg-server @0@" "X Version 11"'.format(meson.project_version()))
|
|
|
|
manpage_config.set('xorgversion', '"xorg-server @0@" "X Version 11"'.format(meson.project_version()))
|
2018-03-27 00:42:57 +02:00
|
|
|
manpage_config.set('xservername', 'Xorg')
|
|
|
|
manpage_config.set('xconfigfile', 'xorg.conf')
|
|
|
|
manpage_config.set('projectroot', get_option('prefix'))
|
|
|
|
manpage_config.set('apploaddir', '$(appdefaultdir)')
|
|
|
|
manpage_config.set('appmansuffix', '1')
|
|
|
|
manpage_config.set('drivermansuffix', '4')
|
|
|
|
manpage_config.set('adminmansuffix', '8')
|
|
|
|
manpage_config.set('libmansuffix', '3')
|
|
|
|
manpage_config.set('miscmansuffix', '7')
|
|
|
|
manpage_config.set('filemansuffix', '5')
|
|
|
|
manpage_config.set('logdir', log_dir)
|
2018-06-30 13:53:35 +02:00
|
|
|
manpage_config.set('datadir', join_paths(get_option('prefix'), get_option('datadir')))
|
|
|
|
manpage_config.set('mandir', join_paths(get_option('prefix'), get_option('mandir')))
|
|
|
|
manpage_config.set('sysconfdir', join_paths(get_option('prefix'), get_option('sysconfdir')))
|
2018-03-27 00:42:57 +02:00
|
|
|
manpage_config.set('xconfigdir', 'xorg.conf.d')
|
|
|
|
manpage_config.set('xkbdir', xkb_dir)
|
|
|
|
manpage_config.set('XKB_DFLT_RULES', get_option('xkb_default_rules'))
|
|
|
|
manpage_config.set('XKB_DFLT_MODEL', get_option('xkb_default_model'))
|
|
|
|
manpage_config.set('XKB_DFLT_LAYOUT', get_option('xkb_default_layout'))
|
|
|
|
manpage_config.set('XKB_DFLT_VARIANT', get_option('xkb_default_variant'))
|
|
|
|
manpage_config.set('XKB_DFLT_OPTIONS', get_option('xkb_default_options'))
|
|
|
|
manpage_config.set('bundle_id_prefix', '...')
|
2018-05-02 21:54:26 +02:00
|
|
|
manpage_config.set('modulepath', module_dir)
|
2018-03-27 00:42:57 +02:00
|
|
|
# wtf doesn't this work
|
|
|
|
# manpage_config.set('suid_wrapper_dir', join_paths(get_option('prefix'), libexecdir))
|
2018-03-27 18:58:15 +02:00
|
|
|
manpage_config.set('suid_wrapper_dir', join_paths(get_option('prefix'), 'libexec'))
|
2018-03-26 20:57:07 +02:00
|
|
|
manpage_config.set('default_font_path', default_font_path)
|
2018-03-27 00:42:57 +02:00
|
|
|
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
# Include must come first, as it sets up dix-config.h
|
|
|
|
subdir('include')
|
|
|
|
|
|
|
|
# X server core
|
|
|
|
subdir('config')
|
|
|
|
subdir('dix')
|
|
|
|
subdir('dri3')
|
|
|
|
subdir('glx')
|
|
|
|
subdir('fb')
|
|
|
|
subdir('mi')
|
|
|
|
subdir('os')
|
|
|
|
# X extensions
|
|
|
|
subdir('composite')
|
|
|
|
subdir('damageext')
|
|
|
|
subdir('dbe')
|
|
|
|
subdir('miext/damage')
|
|
|
|
subdir('miext/shadow')
|
|
|
|
subdir('miext/sync')
|
2019-04-19 15:01:48 +02:00
|
|
|
if build_rootless
|
|
|
|
subdir('miext/rootless')
|
|
|
|
endif
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
subdir('present')
|
|
|
|
if build_xwin or build_xquartz
|
|
|
|
subdir('pseudoramiX')
|
|
|
|
endif
|
|
|
|
subdir('randr')
|
|
|
|
subdir('record')
|
|
|
|
subdir('render')
|
|
|
|
subdir('xfixes')
|
|
|
|
subdir('xkb')
|
|
|
|
subdir('Xext')
|
|
|
|
subdir('Xi')
|
|
|
|
# other
|
|
|
|
if build_glamor
|
|
|
|
subdir('glamor')
|
|
|
|
endif
|
|
|
|
if build_xorg or get_option('xephyr')
|
|
|
|
subdir('exa')
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Common static libraries of all X servers
|
|
|
|
libxserver = [
|
|
|
|
libxserver_mi,
|
|
|
|
libxserver_dix,
|
|
|
|
|
|
|
|
libxserver_composite,
|
|
|
|
libxserver_damageext,
|
|
|
|
libxserver_dbe,
|
|
|
|
libxserver_randr,
|
|
|
|
libxserver_miext_damage,
|
|
|
|
libxserver_render,
|
|
|
|
libxserver_present,
|
|
|
|
libxserver_xext,
|
|
|
|
libxserver_miext_sync,
|
|
|
|
libxserver_xfixes,
|
|
|
|
libxserver_xi,
|
|
|
|
libxserver_xkb,
|
|
|
|
libxserver_record,
|
|
|
|
|
|
|
|
libxserver_os,
|
|
|
|
]
|
|
|
|
|
2017-05-09 13:23:48 +02:00
|
|
|
libxserver += libxserver_dri3
|
|
|
|
|
Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet. The unit tests are also not done.
The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools. meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.
v2: Fix indentation nits, move version declaration to project(), use
existing meson_options for version-config.h's vendor name/web.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-03-11 19:24:04 +01:00
|
|
|
subdir('hw')
|
2019-04-26 02:09:25 +02:00
|
|
|
|
|
|
|
if host_machine.system() != 'windows'
|
|
|
|
subdir('test')
|
|
|
|
endif
|
2018-03-27 00:42:57 +02:00
|
|
|
|
|
|
|
install_man(configure_file(
|
|
|
|
input: 'man/Xserver.man',
|
|
|
|
output: 'Xserver.1',
|
|
|
|
configuration: manpage_config,
|
|
|
|
))
|
2018-03-27 00:43:00 +02:00
|
|
|
|
|
|
|
if build_xorg
|
|
|
|
sdkconfig = configuration_data()
|
|
|
|
awk = find_program('awk')
|
|
|
|
|
|
|
|
sdkconfig.set('prefix', get_option('prefix'))
|
2018-03-28 14:04:37 +02:00
|
|
|
sdkconfig.set('exec_prefix', '${prefix}')
|
|
|
|
sdkconfig.set('libdir', join_paths('${exec_prefix}', get_option('libdir')))
|
|
|
|
sdkconfig.set('includedir', join_paths('${prefix}', get_option('includedir')))
|
|
|
|
sdkconfig.set('datarootdir', join_paths('${prefix}', get_option('datadir')))
|
2018-05-02 21:54:26 +02:00
|
|
|
sdkconfig.set('moduledir', join_paths('${exec_prefix}', module_dir))
|
2018-03-28 14:04:37 +02:00
|
|
|
sdkconfig.set('sdkdir', join_paths('${prefix}', get_option('includedir'), 'xorg'))
|
|
|
|
sdkconfig.set('sysconfigdir', join_paths('${datarootdir}', 'X11/xorg.conf.d'))
|
2018-03-27 00:43:00 +02:00
|
|
|
|
|
|
|
sdkconfig.set('abi_ansic',
|
|
|
|
run_command(awk, '-F', '[(,)]',
|
2018-03-28 14:04:38 +02:00
|
|
|
'/^#define ABI_ANSIC.*SET/ { printf "%d.%d", $2, $3 }',
|
2018-03-27 00:43:00 +02:00
|
|
|
files('hw/xfree86/common/xf86Module.h')
|
|
|
|
).stdout()
|
|
|
|
)
|
|
|
|
sdkconfig.set('abi_videodrv',
|
|
|
|
run_command(awk, '-F', '[(,)]',
|
2018-03-28 14:04:38 +02:00
|
|
|
'/^#define ABI_VIDEODRV.*SET/ { printf "%d.%d", $2, $3 }',
|
2018-03-27 00:43:00 +02:00
|
|
|
files('hw/xfree86/common/xf86Module.h')
|
|
|
|
).stdout()
|
|
|
|
)
|
|
|
|
sdkconfig.set('abi_xinput',
|
|
|
|
run_command(awk, '-F', '[(,)]',
|
2018-03-28 14:04:38 +02:00
|
|
|
'/^#define ABI_XINPUT.*SET/ { printf "%d.%d", $2, $3 }',
|
2018-03-27 00:43:00 +02:00
|
|
|
files('hw/xfree86/common/xf86Module.h')
|
|
|
|
).stdout()
|
|
|
|
)
|
|
|
|
sdkconfig.set('abi_extension',
|
|
|
|
run_command(awk, '-F', '[(,)]',
|
2018-03-28 14:04:38 +02:00
|
|
|
'/^#define ABI_EXTENSION.*SET/ { printf "%d.%d", $2, $3 }',
|
2018-03-27 00:43:00 +02:00
|
|
|
files('hw/xfree86/common/xf86Module.h')
|
|
|
|
).stdout()
|
|
|
|
)
|
|
|
|
|
2018-03-29 13:07:56 +02:00
|
|
|
sdk_required_modules = [
|
|
|
|
'pixman-1 >= 0.27.2',
|
|
|
|
]
|
|
|
|
|
2018-03-27 00:43:00 +02:00
|
|
|
# XXX this isn't trying very hard, but hard enough.
|
|
|
|
sdkconfig.set('PACKAGE_VERSION', meson.project_version())
|
2018-03-29 13:07:56 +02:00
|
|
|
sdkconfig.set('SDK_REQUIRED_MODULES', ' '.join(sdk_required_modules))
|
2018-03-27 00:43:00 +02:00
|
|
|
sdkconfig.set('symbol_visibility', '-fvisibility=hidden')
|
|
|
|
sdkconfig.set('XORG_DRIVER_LIBS', '')
|
|
|
|
|
|
|
|
configure_file(
|
|
|
|
input: 'xorg-server.pc.in',
|
|
|
|
output: 'xorg-server.pc',
|
|
|
|
configuration: sdkconfig,
|
|
|
|
install_dir: join_paths(get_option('prefix'),
|
|
|
|
get_option('libdir'),
|
|
|
|
'pkgconfig'),
|
|
|
|
)
|
|
|
|
endif
|
2018-03-27 00:43:01 +02:00
|
|
|
|
|
|
|
install_data('xorg-server.m4',
|
|
|
|
install_dir: join_paths(get_option('datadir'), 'aclocal'))
|