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
|
|
|
srcs_os = [
|
|
|
|
'WaitFor.c',
|
|
|
|
'access.c',
|
|
|
|
'auth.c',
|
|
|
|
'backtrace.c',
|
|
|
|
'client.c',
|
|
|
|
'connection.c',
|
|
|
|
'inputthread.c',
|
|
|
|
'io.c',
|
|
|
|
'mitauth.c',
|
|
|
|
'oscolor.c',
|
|
|
|
'osinit.c',
|
|
|
|
'ospoll.c',
|
|
|
|
'utils.c',
|
|
|
|
'xdmauth.c',
|
|
|
|
'xsha1.c',
|
|
|
|
'xstrans.c',
|
|
|
|
'xprintf.c',
|
|
|
|
'log.c',
|
|
|
|
]
|
|
|
|
|
2021-04-05 15:24:47 +02:00
|
|
|
# Wrapper code for missing C library functions. Note that conf_data contains either '1' or false.
|
2017-04-27 17:47:11 +02:00
|
|
|
srcs_libc = []
|
2021-04-05 15:24:47 +02:00
|
|
|
if conf_data.get('HAVE_REALLOCARRAY') == false
|
2017-04-27 17:47:11 +02:00
|
|
|
srcs_libc += 'reallocarray.c'
|
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
|
2021-04-05 15:24:47 +02:00
|
|
|
if conf_data.get('HAVE_STRCASECMP') == false
|
2017-04-27 17:47:11 +02:00
|
|
|
srcs_libc += 'strcasecmp.c'
|
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
|
2021-04-05 15:24:47 +02:00
|
|
|
if conf_data.get('HAVE_STRCASESTR') == false
|
2017-04-27 17:47:11 +02:00
|
|
|
srcs_libc += 'strcasestr.c'
|
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
|
2021-04-05 15:24:47 +02:00
|
|
|
if conf_data.get('HAVE_STRLCAT') == false
|
2017-04-27 17:47:11 +02:00
|
|
|
srcs_libc += 'strlcat.c'
|
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
|
2021-04-05 15:24:47 +02:00
|
|
|
if conf_data.get('HAVE_STRLCPY') == false
|
2017-04-27 17:47:11 +02:00
|
|
|
srcs_libc += 'strlcpy.c'
|
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
|
2021-04-05 15:24:47 +02:00
|
|
|
if conf_data.get('HAVE_STRNDUP') == false
|
2017-04-27 17:47:11 +02:00
|
|
|
srcs_libc += 'strndup.c'
|
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
|
2021-04-05 15:24:47 +02:00
|
|
|
if conf_data.get('HAVE_TIMINGSAFE_MEMCMP') == false
|
2017-04-27 17:47:11 +02:00
|
|
|
srcs_libc += 'timingsafe_memcmp.c'
|
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
|
2021-04-05 15:24:47 +02:00
|
|
|
if conf_data.get('HAVE_POLL') == 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
|
|
|
srcs_os += 'xserver_poll.c'
|
|
|
|
endif
|
2017-05-04 14:46:23 +02:00
|
|
|
|
2021-04-05 15:24:47 +02:00
|
|
|
if conf_data.get('BUSFAULT') != 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
|
|
|
srcs_os += 'busfault.c'
|
|
|
|
endif
|
|
|
|
|
|
|
|
if get_option('xdmcp')
|
|
|
|
srcs_os += 'xdmcp.c'
|
|
|
|
endif
|
|
|
|
|
2018-01-17 14:43:47 +01:00
|
|
|
rpc_dep = []
|
2018-01-08 21:50:28 +01:00
|
|
|
if get_option('secure-rpc')
|
2018-06-22 18:49:47 +02:00
|
|
|
# prefer libtirpc (if available), otherwise ensure RPC functions are
|
2018-01-17 14:43:47 +01:00
|
|
|
# provided by libc.
|
|
|
|
rpc_dep = dependency('libtirpc', required: false)
|
2018-06-22 18:49:47 +02:00
|
|
|
if not (rpc_dep.found() or cc.has_header('rpc/rpc.h'))
|
|
|
|
error('secure-rpc requested, but neither libtirpc or libc RPC support were found')
|
|
|
|
endif
|
2019-04-18 18:06:41 +02:00
|
|
|
# XXX: also check if RPC library provides xdr_opaque_auth, authdes_(sec)create ???
|
2018-01-08 21:50:28 +01:00
|
|
|
srcs_os += 'rpcauth.c'
|
|
|
|
endif
|
|
|
|
|
2018-08-08 01:23:18 +02:00
|
|
|
os_dep = []
|
|
|
|
os_c_args = []
|
|
|
|
if get_option('xres')
|
|
|
|
# Only the XRes extension cares about the client ID.
|
|
|
|
os_c_args += '-DCLIENTIDS'
|
|
|
|
if host_machine.system() == 'openbsd'
|
2021-04-05 15:24:45 +02:00
|
|
|
os_dep += cc.find_library('kvm')
|
2018-08-08 01:23:18 +02:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2017-04-27 17:47:11 +02:00
|
|
|
libxlibc = []
|
|
|
|
if srcs_libc.length() > 0
|
|
|
|
libxlibc = static_library('libxlibc',
|
|
|
|
srcs_libc,
|
|
|
|
include_directories: inc,
|
2018-03-29 13:07:54 +02:00
|
|
|
dependencies: [
|
|
|
|
xproto_dep,
|
|
|
|
],
|
2017-04-27 17:47:11 +02:00
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
2021-04-05 15:24:48 +02:00
|
|
|
if enable_input_thread
|
|
|
|
os_dep += cc.find_library('pthread')
|
|
|
|
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
|
|
|
libxserver_os = static_library('libxserver_os',
|
|
|
|
srcs_os,
|
|
|
|
include_directories: inc,
|
|
|
|
dependencies: [
|
2019-08-27 21:54:42 +02:00
|
|
|
dtrace_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
|
|
|
common_dep,
|
|
|
|
dl_dep,
|
|
|
|
sha1_dep,
|
2018-01-17 14:43:47 +01:00
|
|
|
rpc_dep,
|
2018-08-08 01:23:18 +02:00
|
|
|
os_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
|
|
|
dependency('xau')
|
|
|
|
],
|
2018-08-08 01:23:18 +02:00
|
|
|
c_args: os_c_args,
|
2017-04-27 17:47:11 +02:00
|
|
|
link_with: libxlibc,
|
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
|
|
|
)
|