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>
This commit is contained in:
parent
c7be7a688a
commit
1549e30372
|
@ -0,0 +1,61 @@
|
|||
srcs_xext = [
|
||||
'bigreq.c',
|
||||
'geext.c',
|
||||
'shape.c',
|
||||
'sleepuntil.c',
|
||||
'sync.c',
|
||||
'xcmisc.c',
|
||||
'xtest.c',
|
||||
]
|
||||
|
||||
if build_dpms
|
||||
srcs_xext += 'dpms.c'
|
||||
endif
|
||||
|
||||
if build_mitshm
|
||||
srcs_xext += 'shm.c'
|
||||
endif
|
||||
|
||||
if build_res
|
||||
srcs_xext += ['hashtable.c', 'xres.c']
|
||||
endif
|
||||
|
||||
if build_screensaver
|
||||
srcs_xext += 'saver.c'
|
||||
endif
|
||||
|
||||
if build_xace
|
||||
srcs_xext += 'xace.c'
|
||||
endif
|
||||
|
||||
if build_xf86bigfont
|
||||
srcs_xext += 'xf86bigfont.c'
|
||||
endif
|
||||
|
||||
if build_xinerama
|
||||
srcs_xext += ['panoramiX.c', 'panoramiXprocs.c', 'panoramiXSwap.c']
|
||||
endif
|
||||
|
||||
if build_xsecurity
|
||||
srcs_xext += ['security.c']
|
||||
endif
|
||||
|
||||
if build_xselinux
|
||||
srcs_xext += ['xselinux_ext.c', 'xselinux_hooks.c', 'xselinux_label.c']
|
||||
endif
|
||||
|
||||
if build_xv
|
||||
srcs_xext += ['xvmain.c', 'xvdisp.c', 'xvmc.c']
|
||||
endif
|
||||
|
||||
libxserver_xext = static_library('libxserver_xext',
|
||||
srcs_xext,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
||||
|
||||
libxserver_xext_vidmode = static_library('libxserver_xext_vidmode',
|
||||
'vidmode.c',
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
|
@ -0,0 +1,67 @@
|
|||
srcs_xi = [
|
||||
'allowev.c',
|
||||
'chgdctl.c',
|
||||
'chgfctl.c',
|
||||
'chgkbd.c',
|
||||
'chgkmap.c',
|
||||
'chgprop.c',
|
||||
'chgptr.c',
|
||||
'closedev.c',
|
||||
'devbell.c',
|
||||
'exevents.c',
|
||||
'extinit.c',
|
||||
'getbmap.c',
|
||||
'getdctl.c',
|
||||
'getfctl.c',
|
||||
'getfocus.c',
|
||||
'getkmap.c',
|
||||
'getmmap.c',
|
||||
'getprop.c',
|
||||
'getselev.c',
|
||||
'getvers.c',
|
||||
'grabdev.c',
|
||||
'grabdevb.c',
|
||||
'grabdevk.c',
|
||||
'gtmotion.c',
|
||||
'listdev.c',
|
||||
'opendev.c',
|
||||
'queryst.c',
|
||||
'selectev.c',
|
||||
'sendexev.c',
|
||||
'setbmap.c',
|
||||
'setdval.c',
|
||||
'setfocus.c',
|
||||
'setmmap.c',
|
||||
'setmode.c',
|
||||
'ungrdev.c',
|
||||
'ungrdevb.c',
|
||||
'ungrdevk.c',
|
||||
'xiallowev.c',
|
||||
'xibarriers.c',
|
||||
'xichangecursor.c',
|
||||
'xichangehierarchy.c',
|
||||
'xigetclientpointer.c',
|
||||
'xigrabdev.c',
|
||||
'xipassivegrab.c',
|
||||
'xiproperty.c',
|
||||
'xiquerydevice.c',
|
||||
'xiquerypointer.c',
|
||||
'xiqueryversion.c',
|
||||
'xiselectev.c',
|
||||
'xisetclientpointer.c',
|
||||
'xisetdevfocus.c',
|
||||
'xiwarppointer.c',
|
||||
]
|
||||
|
||||
libxserver_xi = static_library('libxserver_xi',
|
||||
srcs_xi,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
||||
|
||||
srcs_xi_stubs = ['stubs.c']
|
||||
libxserver_xi_stubs = static_library('libxserver_xi_stubs',
|
||||
srcs_xi_stubs,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
|
@ -0,0 +1,13 @@
|
|||
srcs_composite = [
|
||||
'compalloc.c',
|
||||
'compext.c',
|
||||
'compinit.c',
|
||||
'compoverlay.c',
|
||||
'compwindow.c',
|
||||
]
|
||||
|
||||
libxserver_composite = static_library('libxserver_composite',
|
||||
srcs_composite,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
|
@ -0,0 +1,35 @@
|
|||
srcs_config = [
|
||||
'config.c',
|
||||
]
|
||||
|
||||
config_dep = [common_dep]
|
||||
|
||||
if build_dbus
|
||||
srcs_config += 'dbus-core.c'
|
||||
config_dep += dbus_dep
|
||||
endif
|
||||
|
||||
if build_hal
|
||||
srcs_config += 'hal.c'
|
||||
config_dep += hal_dep
|
||||
endif
|
||||
|
||||
if build_udev
|
||||
srcs_config += 'udev.c'
|
||||
config_dep += udev_dep
|
||||
endif
|
||||
|
||||
if host_machine.system() == 'openbsd'
|
||||
srcs_config += 'wscons.c'
|
||||
endif
|
||||
|
||||
if build_xorg
|
||||
install_data('10-quirks.conf',
|
||||
install_dir: join_paths(get_option('datadir'), 'xorg.conf.d'))
|
||||
endif
|
||||
|
||||
libxserver_config = static_library('libxserver_config',
|
||||
srcs_config,
|
||||
include_directories: inc,
|
||||
dependencies: config_dep,
|
||||
)
|
|
@ -0,0 +1,9 @@
|
|||
srcs_damageext = [
|
||||
'damageext.c',
|
||||
]
|
||||
|
||||
libxserver_damageext = static_library('libxserver_damageext',
|
||||
srcs_damageext,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
|
@ -0,0 +1,10 @@
|
|||
srcs_dbe = [
|
||||
'dbe.c',
|
||||
'midbe.c',
|
||||
]
|
||||
|
||||
libxserver_dbe = static_library('libxserver_dbe',
|
||||
srcs_dbe,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
|
@ -0,0 +1,47 @@
|
|||
srcs_dix = [
|
||||
'atom.c',
|
||||
'colormap.c',
|
||||
'cursor.c',
|
||||
'devices.c',
|
||||
'dispatch.c',
|
||||
'dixfonts.c',
|
||||
'main.c',
|
||||
'dixutils.c',
|
||||
'enterleave.c',
|
||||
'events.c',
|
||||
'eventconvert.c',
|
||||
'extension.c',
|
||||
'ffs.c',
|
||||
'gc.c',
|
||||
'getevents.c',
|
||||
'globals.c',
|
||||
'glyphcurs.c',
|
||||
'grabs.c',
|
||||
'initatoms.c',
|
||||
'inpututils.c',
|
||||
'pixmap.c',
|
||||
'privates.c',
|
||||
'property.c',
|
||||
'ptrveloc.c',
|
||||
'region.c',
|
||||
'registry.c',
|
||||
'resource.c',
|
||||
'selection.c',
|
||||
'swaprep.c',
|
||||
'swapreq.c',
|
||||
'tables.c',
|
||||
'touch.c',
|
||||
'window.c',
|
||||
]
|
||||
|
||||
libxserver_dix = static_library('libxserver_dix',
|
||||
srcs_dix,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
||||
|
||||
libxserver_main = static_library('libxserver_main',
|
||||
'stubmain.c',
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
|
@ -0,0 +1,12 @@
|
|||
srcs_dri3 = [
|
||||
'dri3.c',
|
||||
'dri3_request.c',
|
||||
'dri3_screen.c',
|
||||
]
|
||||
|
||||
libxserver_dri3 = static_library('libxserver_dri3',
|
||||
srcs_dri3,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
c_args: '-DHAVE_XORG_CONFIG_H'
|
||||
)
|
|
@ -0,0 +1,24 @@
|
|||
srcs_exa = [
|
||||
'exa.c',
|
||||
'exa_classic.c',
|
||||
'exa_migration_classic.c',
|
||||
'exa_driver.c',
|
||||
'exa_mixed.c',
|
||||
'exa_migration_mixed.c',
|
||||
'exa_accel.c',
|
||||
'exa_glyphs.c',
|
||||
'exa_offscreen.c',
|
||||
'exa_render.c',
|
||||
'exa_unaccel.c',
|
||||
]
|
||||
|
||||
libxserver_exa = static_library('libxserver_exa',
|
||||
srcs_exa,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
c_args: '-DHAVE_XORG_CONFIG_H'
|
||||
)
|
||||
|
||||
if build_xorg
|
||||
install_data('exa.h', install_dir: xorgsdkdir)
|
||||
endif
|
|
@ -0,0 +1,36 @@
|
|||
srcs_fb = [
|
||||
'fballpriv.c',
|
||||
'fbarc.c',
|
||||
'fbbits.c',
|
||||
'fbblt.c',
|
||||
'fbbltone.c',
|
||||
'fbcmap_mi.c',
|
||||
'fbcopy.c',
|
||||
'fbfill.c',
|
||||
'fbfillrect.c',
|
||||
'fbfillsp.c',
|
||||
'fbgc.c',
|
||||
'fbgetsp.c',
|
||||
'fbglyph.c',
|
||||
'fbimage.c',
|
||||
'fbline.c',
|
||||
'fboverlay.c',
|
||||
'fbpict.c',
|
||||
'fbpixmap.c',
|
||||
'fbpoint.c',
|
||||
'fbpush.c',
|
||||
'fbscreen.c',
|
||||
'fbseg.c',
|
||||
'fbsetsp.c',
|
||||
'fbsolid.c',
|
||||
'fbtrap.c',
|
||||
'fbutil.c',
|
||||
'fbwindow.c',
|
||||
]
|
||||
|
||||
libxserver_fb = static_library('libxserver_fb',
|
||||
srcs_fb,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
pic: true,
|
||||
)
|
|
@ -0,0 +1,58 @@
|
|||
srcs_glamor = [
|
||||
'glamor.c',
|
||||
'glamor_copy.c',
|
||||
'glamor_core.c',
|
||||
'glamor_dash.c',
|
||||
'glamor_font.c',
|
||||
'glamor_glx.c',
|
||||
'glamor_composite_glyphs.c',
|
||||
'glamor_image.c',
|
||||
'glamor_lines.c',
|
||||
'glamor_segs.c',
|
||||
'glamor_render.c',
|
||||
'glamor_gradient.c',
|
||||
'glamor_prepare.c',
|
||||
'glamor_program.c',
|
||||
'glamor_rects.c',
|
||||
'glamor_spans.c',
|
||||
'glamor_text.c',
|
||||
'glamor_transfer.c',
|
||||
'glamor_transform.c',
|
||||
'glamor_trapezoid.c',
|
||||
'glamor_triangles.c',
|
||||
'glamor_addtraps.c',
|
||||
'glamor_glyphblt.c',
|
||||
'glamor_points.c',
|
||||
'glamor_pixmap.c',
|
||||
'glamor_largepixmap.c',
|
||||
'glamor_picture.c',
|
||||
'glamor_vbo.c',
|
||||
'glamor_window.c',
|
||||
'glamor_fbo.c',
|
||||
'glamor_compositerects.c',
|
||||
'glamor_utils.c',
|
||||
'glamor_sync.c',
|
||||
]
|
||||
|
||||
if build_xv
|
||||
srcs_glamor += 'glamor_xv.c'
|
||||
endif
|
||||
|
||||
glamor = static_library('glamor',
|
||||
srcs_glamor,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
common_dep,
|
||||
dependency('epoxy'),
|
||||
],
|
||||
)
|
||||
|
||||
glamor_egl_stubs = static_library('glamor_egl_stubs',
|
||||
'glamor_egl_stubs.c',
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
||||
|
||||
if build_xorg
|
||||
install_data('glamor.h', install_dir: xorgsdkdir)
|
||||
endif
|
|
@ -0,0 +1,50 @@
|
|||
srcs_glx = [
|
||||
'indirect_dispatch.c',
|
||||
'indirect_dispatch_swap.c',
|
||||
'indirect_reqsize.c',
|
||||
'indirect_size_get.c',
|
||||
'indirect_table.c',
|
||||
'clientinfo.c',
|
||||
'createcontext.c',
|
||||
'extension_string.c',
|
||||
'indirect_util.c',
|
||||
'indirect_program.c',
|
||||
'indirect_texture_compression.c',
|
||||
'glxcmds.c',
|
||||
'glxcmdsswap.c',
|
||||
'glxext.c',
|
||||
'glxdriswrast.c',
|
||||
'glxdricommon.c',
|
||||
'glxscreens.c',
|
||||
'render2.c',
|
||||
'render2swap.c',
|
||||
'renderpix.c',
|
||||
'renderpixswap.c',
|
||||
'rensize.c',
|
||||
'single2.c',
|
||||
'single2swap.c',
|
||||
'singlepix.c',
|
||||
'singlepixswap.c',
|
||||
'singlesize.c',
|
||||
'swap_interval.c',
|
||||
'xfont.c',
|
||||
]
|
||||
|
||||
libxserver_glx = ''
|
||||
if build_glx
|
||||
libxserver_glx = static_library('libxserver_glx',
|
||||
srcs_glx,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
common_dep,
|
||||
dl_dep,
|
||||
dependency('glproto', version: '>= 1.4.17'),
|
||||
dependency('gl', version: '>= 9.2.0'),
|
||||
],
|
||||
c_args: [
|
||||
glx_align64,
|
||||
# XXX: generated code includes an unused function
|
||||
'-Wno-unused-function',
|
||||
]
|
||||
)
|
||||
endif
|
|
@ -0,0 +1,81 @@
|
|||
flex = find_program('flex')
|
||||
bison = find_program('bison')
|
||||
|
||||
lgen = generator(
|
||||
flex,
|
||||
output : '@PLAINNAME@.yy.c',
|
||||
arguments : ['-o', '@OUTPUT@', '@INPUT@']
|
||||
)
|
||||
lfiles = lgen.process('scanner.l')
|
||||
|
||||
pgen = generator(
|
||||
bison,
|
||||
output : ['@BASENAME@.c', '@BASENAME@.h'],
|
||||
arguments : ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@']
|
||||
)
|
||||
pfiles = pgen.process('parser.y')
|
||||
|
||||
srcs_dmx_config = [
|
||||
'dmxparse.c',
|
||||
'dmxprint.c',
|
||||
'dmxcompat.c',
|
||||
'dmxconfig.c',
|
||||
pfiles,
|
||||
lfiles,
|
||||
]
|
||||
|
||||
dmx_inc = [
|
||||
inc,
|
||||
include_directories('../')
|
||||
]
|
||||
|
||||
dmx_c_args = [
|
||||
'-DHAVE_DMX_CONFIG_H',
|
||||
'-DDMX_LOG_STANDALONE',
|
||||
]
|
||||
|
||||
dmx_config = static_library('dmx_config',
|
||||
srcs_dmx_config,
|
||||
include_directories: dmx_inc,
|
||||
dependencies: common_dep,
|
||||
c_args: dmx_c_args,
|
||||
)
|
||||
|
||||
executable('xdmxconfig',
|
||||
[
|
||||
'xdmxconfig.c',
|
||||
'../dmxlog.c',
|
||||
'Canvas.c',
|
||||
],
|
||||
include_directories: [
|
||||
inc,
|
||||
include_directories('../')
|
||||
],
|
||||
dependencies: [
|
||||
common_dep,
|
||||
dependency('xaw7'),
|
||||
dependency('xmu'),
|
||||
dependency('xt'),
|
||||
dependency('xpm'),
|
||||
dependency('x11'),
|
||||
],
|
||||
link_with: dmx_config,
|
||||
c_args: dmx_c_args,
|
||||
install: true,
|
||||
)
|
||||
|
||||
executable('vdltodmx',
|
||||
'vdltodmx.c',
|
||||
include_directories: dmx_inc,
|
||||
link_with: dmx_config,
|
||||
c_args: dmx_c_args,
|
||||
install: true,
|
||||
)
|
||||
|
||||
executable('dmxtodmx',
|
||||
'dmxtodmx.c',
|
||||
include_directories: dmx_inc,
|
||||
link_with: dmx_config,
|
||||
c_args: dmx_c_args,
|
||||
install: true,
|
||||
)
|
|
@ -0,0 +1,33 @@
|
|||
dmxexamples_dep = [
|
||||
dependency('xext'),
|
||||
dependency('x11'),
|
||||
]
|
||||
|
||||
dmx_dep = dependency('dmx', version: '>= 1.0.99.1')
|
||||
|
||||
dmx_examples = [
|
||||
['dmxinfo', [dmx_dep]],
|
||||
['dmxwininfo', [dmx_dep, dependency('xmu')]],
|
||||
['dmxreconfig', [dmx_dep]],
|
||||
['dmxresize', [dmx_dep]],
|
||||
['dmxaddscreen', [dmx_dep]],
|
||||
['dmxrmscreen', [dmx_dep]],
|
||||
['dmxaddinput', [dmx_dep]],
|
||||
['xinput', [dmx_dep, dependency('xi')]],
|
||||
['xtest', [dependency('xtst')]],
|
||||
['evi', []],
|
||||
['xled', []],
|
||||
['xbell', []],
|
||||
['res', [dependency('xres')]],
|
||||
]
|
||||
|
||||
foreach ex: dmx_examples
|
||||
bin = ex[0]
|
||||
extra_dep = ex[1]
|
||||
|
||||
executable(bin, bin + '.c', dependencies: [dmxexamples_dep, extra_dep])
|
||||
endforeach
|
||||
|
||||
if cc.has_header('linux/input.h')
|
||||
executable('ev', 'ev.c')
|
||||
endif
|
|
@ -0,0 +1,27 @@
|
|||
srcs_dmx_glx = [
|
||||
'compsize.c',
|
||||
'g_disptab.c',
|
||||
'global.c',
|
||||
'glxcmds.c',
|
||||
'glxcmdsswap.c',
|
||||
'glxext.c',
|
||||
'glxfbconfig.c',
|
||||
'glxscreens.c',
|
||||
'glxsingle.c',
|
||||
'glxswap.c',
|
||||
'glxvendor.c',
|
||||
'glxvisuals.c',
|
||||
'g_renderswap.c',
|
||||
'render2swap.c',
|
||||
'renderpixswap.c',
|
||||
]
|
||||
|
||||
dmx_glx = static_library('dmx_glx',
|
||||
srcs_dmx_glx,
|
||||
include_directories: [
|
||||
inc,
|
||||
include_directories('../')
|
||||
],
|
||||
dependencies: common_dep,
|
||||
c_args: ['-DHAVE_DMX_CONFIG_H', glx_align64],
|
||||
)
|
|
@ -0,0 +1,32 @@
|
|||
srcs_dmx_input = [
|
||||
'dmxdummy.c',
|
||||
'dmxbackend.c',
|
||||
'dmxconsole.c',
|
||||
'dmxcommon.c',
|
||||
'dmxinputinit.c',
|
||||
'dmxarg.c',
|
||||
'dmxevents.c',
|
||||
'dmxxinput.c',
|
||||
'dmxmotion.c',
|
||||
'dmxmap.c',
|
||||
'ChkNotMaskEv.c',
|
||||
]
|
||||
|
||||
if cc.has_header('linux/input.h')
|
||||
srcs_dmx_input += [
|
||||
'usb-keyboard.c',
|
||||
'usb-mouse.c',
|
||||
'usb-other.c',
|
||||
'usb-common.c',
|
||||
]
|
||||
endif
|
||||
|
||||
dmx_input = static_library('dmx_input',
|
||||
srcs_dmx_input,
|
||||
include_directories: [
|
||||
inc,
|
||||
include_directories('../')
|
||||
],
|
||||
dependencies: common_dep,
|
||||
c_args: '-DHAVE_DMX_CONFIG_H',
|
||||
)
|
|
@ -0,0 +1,68 @@
|
|||
srcs = [
|
||||
'dmx.c',
|
||||
'dmxcb.c',
|
||||
'dmxcmap.c',
|
||||
'dmxcursor.c',
|
||||
'dmxdpms.c',
|
||||
'dmxextension.c',
|
||||
'dmxfont.c',
|
||||
'dmxgc.c',
|
||||
'dmxgcops.c',
|
||||
'dmxinit.c',
|
||||
'dmxinput.c',
|
||||
'dmxlog.c',
|
||||
'dmxpict.c',
|
||||
'dmxpixmap.c',
|
||||
'dmxprop.c',
|
||||
'dmxscrinit.c',
|
||||
'dmxstat.c',
|
||||
'dmxsync.c',
|
||||
'dmxvisual.c',
|
||||
'dmxwindow.c',
|
||||
'../../mi/miinitext.c',
|
||||
'../../Xext/panoramiX.c',
|
||||
]
|
||||
|
||||
subdir('config')
|
||||
subdir('input')
|
||||
subdir('examples')
|
||||
# XXX: subdir('doc')
|
||||
# XXX: subdir('doxygen')
|
||||
# XXX: subdir('man')
|
||||
|
||||
dmx_dep = [
|
||||
common_dep,
|
||||
dependency('dmxproto', version: '>= 2.2.99.1'),
|
||||
dependency('xext', version: '>= 1.0.99.4'),
|
||||
dependency('xau'),
|
||||
dependency('xmuu'),
|
||||
dependency('xfixes'),
|
||||
dependency('xrender'),
|
||||
dependency('xi', version: '>= 1.2.99.1'),
|
||||
xdmcp_dep,
|
||||
dl_dep,
|
||||
]
|
||||
|
||||
dmx_glx = ''
|
||||
if build_glx
|
||||
srcs += 'dmx_glxvisuals.c'
|
||||
subdir('glxProxy')
|
||||
endif
|
||||
|
||||
executable(
|
||||
'Xdmx',
|
||||
srcs,
|
||||
include_directories: inc,
|
||||
dependencies: dmx_dep,
|
||||
link_with: [
|
||||
libxserver_main,
|
||||
libxserver_fb,
|
||||
libxserver,
|
||||
libxserver_xkb_stubs,
|
||||
dmx_input,
|
||||
dmx_config,
|
||||
dmx_glx,
|
||||
],
|
||||
c_args: '-DHAVE_DMX_CONFIG_H',
|
||||
install: true,
|
||||
)
|
|
@ -0,0 +1,62 @@
|
|||
srcs = [
|
||||
'ephyr.c',
|
||||
'ephyrinit.c',
|
||||
'ephyrcursor.c',
|
||||
'ephyr_draw.c',
|
||||
'hostx.c',
|
||||
'os.c',
|
||||
]
|
||||
|
||||
xephyr_dep = [
|
||||
common_dep,
|
||||
dependency('xcb'),
|
||||
dependency('xcb-shape'),
|
||||
dependency('xcb-render'),
|
||||
dependency('xcb-renderutil'),
|
||||
dependency('xcb-aux'),
|
||||
dependency('xcb-image'),
|
||||
dependency('xcb-icccm'),
|
||||
dependency('xcb-shm'),
|
||||
dependency('xcb-keysyms'),
|
||||
dependency('xcb-randr'),
|
||||
dependency('xcb-xkb'),
|
||||
]
|
||||
|
||||
xephyr_glamor = []
|
||||
if build_glamor
|
||||
srcs += 'ephyr_glamor_glx.c'
|
||||
if build_xv
|
||||
srcs += 'ephyr_glamor_xv.c'
|
||||
endif
|
||||
xephyr_glamor += glamor
|
||||
xephyr_glamor += glamor_egl_stubs
|
||||
xephyr_dep += dependency('x11-xcb')
|
||||
endif
|
||||
|
||||
if build_xv
|
||||
srcs += 'ephyrvideo.c'
|
||||
xephyr_dep += dependency('xcb-xv')
|
||||
endif
|
||||
|
||||
executable(
|
||||
'Xephyr',
|
||||
srcs,
|
||||
include_directories: [
|
||||
inc,
|
||||
include_directories('../src')
|
||||
],
|
||||
dependencies: xephyr_dep,
|
||||
link_with: [
|
||||
libxserver_main,
|
||||
libxserver_exa,
|
||||
xephyr_glamor,
|
||||
kdrive,
|
||||
libxserver_fb,
|
||||
libxserver,
|
||||
libxserver_config,
|
||||
libxserver_xkb_stubs,
|
||||
libxserver_xi_stubs,
|
||||
libxserver_glx,
|
||||
],
|
||||
install: true,
|
||||
)
|
|
@ -0,0 +1,2 @@
|
|||
subdir('src')
|
||||
subdir('ephyr')
|
|
@ -0,0 +1,22 @@
|
|||
srcs_kdrive = [
|
||||
'kcmap.c',
|
||||
'kdrive.c',
|
||||
'kinfo.c',
|
||||
'kinput.c',
|
||||
'kmode.c',
|
||||
'kshadow.c',
|
||||
'../../../mi/miinitext.c',
|
||||
]
|
||||
|
||||
if build_xv
|
||||
srcs_kdrive += 'kxv.c'
|
||||
endif
|
||||
|
||||
#XXX: libconfig
|
||||
|
||||
kdrive = static_library('kdrive',
|
||||
srcs_kdrive,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
link_with: libxserver_miext_shadow,
|
||||
)
|
|
@ -0,0 +1,25 @@
|
|||
if get_option('xephyr')
|
||||
subdir('kdrive')
|
||||
endif
|
||||
|
||||
if get_option('dmx')
|
||||
subdir('dmx')
|
||||
endif
|
||||
|
||||
subdir('vfb')
|
||||
|
||||
if build_xnest
|
||||
subdir('xnest')
|
||||
endif
|
||||
|
||||
if build_xorg
|
||||
subdir('xfree86')
|
||||
endif
|
||||
|
||||
if build_xquartz
|
||||
subdir('xquartz')
|
||||
endif
|
||||
|
||||
if build_xwayland
|
||||
subdir('xwayland')
|
||||
endif
|
|
@ -0,0 +1,21 @@
|
|||
srcs = [
|
||||
'InitInput.c',
|
||||
'InitOutput.c',
|
||||
'../../mi/miinitext.c',
|
||||
]
|
||||
|
||||
executable(
|
||||
'Xvfb',
|
||||
srcs,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
link_with: [
|
||||
libxserver_main,
|
||||
libxserver_fb,
|
||||
libxserver,
|
||||
libxserver_xkb_stubs,
|
||||
libxserver_xi_stubs,
|
||||
libxserver_glx
|
||||
],
|
||||
install: true,
|
||||
)
|
|
@ -0,0 +1,93 @@
|
|||
srcs_xorg_common = [
|
||||
'xf86fbBus.c',
|
||||
'xf86noBus.c',
|
||||
'xf86Configure.c',
|
||||
'xf86Bus.c',
|
||||
'xf86Config.c',
|
||||
'xf86Cursor.c',
|
||||
'xf86DPMS.c',
|
||||
'xf86Events.c',
|
||||
'xf86Globals.c',
|
||||
'xf86AutoConfig.c',
|
||||
'xf86Option.c',
|
||||
'xf86Init.c',
|
||||
'xf86VidMode.c',
|
||||
'xf86fbman.c',
|
||||
'xf86cmap.c',
|
||||
'xf86Helper.c',
|
||||
'xf86PM.c',
|
||||
'xf86RandR.c',
|
||||
'xf86Xinput.c',
|
||||
'xisb.c',
|
||||
'xf86Mode.c',
|
||||
'xorgHelper.c',
|
||||
'xf86Extensions.c',
|
||||
]
|
||||
|
||||
xorg_sdk_headers = [
|
||||
'compiler.h',
|
||||
'fourcc.h',
|
||||
'xf86.h',
|
||||
'xf86Module.h',
|
||||
'xf86Opt.h',
|
||||
'xf86PciInfo.h',
|
||||
'xf86Priv.h',
|
||||
'xf86Privstr.h',
|
||||
'xf86cmap.h',
|
||||
'xf86fbman.h',
|
||||
'xf86str.h',
|
||||
'xf86Xinput.h',
|
||||
'xisb.h',
|
||||
'xorgVersion.h',
|
||||
'xf86sbusBus.h',
|
||||
'xf86VGAarbiter.h',
|
||||
'xf86Optionstr.h',
|
||||
'xf86platformBus.h',
|
||||
'xaarop.h',
|
||||
]
|
||||
|
||||
if build_dga
|
||||
srcs_xorg_common += 'xf86DGA.c'
|
||||
xorg_sdk_headers += 'dgaproc.h'
|
||||
endif
|
||||
|
||||
if build_xv
|
||||
srcs_xorg_common += ['xf86xv.c', 'xf86xvmc.c']
|
||||
xorg_sdk_headers += ['xf86xv.h', 'xf86xvmc.h', 'xf86xvpriv.h']
|
||||
endif
|
||||
|
||||
if build_udev
|
||||
srcs_xorg_common += 'xf86platformBus.c'
|
||||
endif
|
||||
|
||||
if get_option('pciaccess')
|
||||
srcs_xorg_common += ['xf86pciBus.c', 'xf86VGAarbiter.c']
|
||||
endif
|
||||
|
||||
srcs_xorg_common += custom_target(
|
||||
'xf86Build.h',
|
||||
output: 'xf86Build.h',
|
||||
command: [join_paths(meson.current_source_dir(), 'xf86Build.sh'), '@OUTPUT@'],
|
||||
build_always: true,
|
||||
)
|
||||
|
||||
srcs_xorg_common += custom_target(
|
||||
'xf86DefModeSet.c',
|
||||
output: 'xf86DefModeSet.c',
|
||||
input: ['modeline2c.awk', 'vesamodes', 'extramodes'],
|
||||
command: [find_program('awk'), '-f', '@INPUT0@', '@INPUT1@', '@INPUT2@'],
|
||||
capture: true,
|
||||
)
|
||||
|
||||
xorg_common = static_library('xorg_common',
|
||||
srcs_xorg_common,
|
||||
include_directories: [inc, xorg_inc],
|
||||
dependencies: [
|
||||
common_dep,
|
||||
dbus_dep,
|
||||
pciaccess_dep,
|
||||
],
|
||||
c_args: xorg_c_args,
|
||||
)
|
||||
|
||||
install_data(xorg_sdk_headers, install_dir: xorgsdkdir)
|
|
@ -0,0 +1,6 @@
|
|||
BUILD_DATE=`date +'%Y%m%d'`
|
||||
BUILD_TIME=`date +'1%H%M%S'`
|
||||
|
||||
output=$1
|
||||
echo "#define BUILD_DATE $BUILD_DATE" > $output
|
||||
echo "#define BUILD_TIME $BUILD_TIME" > $output
|
|
@ -0,0 +1,15 @@
|
|||
srcs_xorg_ddc = [
|
||||
'ddc.c',
|
||||
'interpret_edid.c',
|
||||
'print_edid.c',
|
||||
'ddcProperty.c',
|
||||
]
|
||||
|
||||
xorg_ddc = static_library('xorg_ddc',
|
||||
srcs_xorg_ddc,
|
||||
include_directories: [inc, xorg_inc],
|
||||
dependencies: common_dep,
|
||||
c_args: xorg_c_args,
|
||||
)
|
||||
|
||||
install_data(['edid.h', 'xf86DDC.h'], install_dir: xorgsdkdir)
|
|
@ -0,0 +1,38 @@
|
|||
srcs_xorg_dixmods = [
|
||||
'xkbVT.c',
|
||||
'xkbPrivate.c',
|
||||
'xkbKillSrv.c',
|
||||
]
|
||||
|
||||
xorg_dixmods = static_library('xorg_dixmods',
|
||||
srcs_xorg_dixmods,
|
||||
include_directories: [inc, xorg_inc],
|
||||
dependencies: common_dep,
|
||||
c_args: xorg_c_args,
|
||||
)
|
||||
|
||||
shared_module(
|
||||
'fb',
|
||||
'fbmodule.c',
|
||||
|
||||
include_directories: [inc, xorg_inc],
|
||||
c_args: xorg_c_args,
|
||||
dependencies: common_dep,
|
||||
objects: libxserver_fb.extract_all_objects(),
|
||||
|
||||
install: true,
|
||||
install_dir: module_dir,
|
||||
)
|
||||
|
||||
shared_module(
|
||||
'shadow',
|
||||
'shmodule.c',
|
||||
|
||||
include_directories: [inc, xorg_inc],
|
||||
c_args: xorg_c_args,
|
||||
dependencies: common_dep,
|
||||
objects: libxserver_miext_shadow.extract_all_objects(),
|
||||
|
||||
install: true,
|
||||
install_dir: module_dir,
|
||||
)
|
|
@ -0,0 +1,23 @@
|
|||
srcs_xorg_dri = [
|
||||
'dri.c',
|
||||
'xf86dri.c',
|
||||
]
|
||||
|
||||
xorg_dri = static_library('xorg_dri',
|
||||
srcs_xorg_dri,
|
||||
include_directories: [inc, xorg_inc],
|
||||
dependencies: [
|
||||
common_dep,
|
||||
dependency('libdrm'),
|
||||
],
|
||||
c_args: xorg_c_args,
|
||||
)
|
||||
|
||||
install_data(
|
||||
[
|
||||
'dri.h',
|
||||
'sarea.h',
|
||||
'dristruct.h',
|
||||
],
|
||||
install_dir: xorgsdkdir,
|
||||
)
|
|
@ -0,0 +1,16 @@
|
|||
srcs_xorg_dri2 = [
|
||||
'dri2.c',
|
||||
'dri2ext.c',
|
||||
]
|
||||
|
||||
xorg_dri2 = static_library('xorg_dri2',
|
||||
srcs_xorg_dri2,
|
||||
include_directories: [inc, xorg_inc],
|
||||
dependencies: [
|
||||
common_dep,
|
||||
dependency('libdrm'),
|
||||
],
|
||||
c_args: xorg_c_args,
|
||||
)
|
||||
|
||||
install_data('dri2.h', install_dir: xorgsdkdir)
|
|
@ -0,0 +1,42 @@
|
|||
modesetting_srcs = [
|
||||
'dri2.c',
|
||||
'driver.c',
|
||||
'drmmode_display.c',
|
||||
'dumb_bo.c',
|
||||
'pageflip.c',
|
||||
'present.c',
|
||||
'vblank.c',
|
||||
]
|
||||
|
||||
shared_module(
|
||||
'modesetting_drv',
|
||||
modesetting_srcs,
|
||||
name_prefix: '',
|
||||
|
||||
include_directories: [inc, xorg_inc],
|
||||
c_args: xorg_c_args,
|
||||
dependencies: [
|
||||
common_dep,
|
||||
udev_dep,
|
||||
dependency('libdrm', version: '>= 2.4.46'),
|
||||
],
|
||||
|
||||
install: true,
|
||||
install_dir: join_paths(module_dir, 'drivers'),
|
||||
)
|
||||
|
||||
# Test that we don't have any unresolved symbols from our module to Xorg.
|
||||
xorg_build_root = join_paths(meson.build_root(), 'hw', 'xfree86')
|
||||
symbol_test_args = []
|
||||
symbol_test_args += join_paths(xorg_build_root, 'Xorg')
|
||||
symbol_test_args += join_paths(xorg_build_root, 'dixmods', 'libfb.so')
|
||||
symbol_test_args += join_paths(xorg_build_root, 'dixmods', 'libshadow.so')
|
||||
if build_glamor
|
||||
symbol_test_args += join_paths(xorg_build_root, 'glamor_egl', 'libglamoregl.so')
|
||||
endif
|
||||
symbol_test_args += join_paths(xorg_build_root, 'drivers', 'modesetting', 'modesetting_drv.so')
|
||||
|
||||
test('modesetting symbol test',
|
||||
xorg_symbol_test,
|
||||
args: symbol_test_args,
|
||||
)
|
|
@ -0,0 +1,9 @@
|
|||
xorg_exa = shared_module('exa',
|
||||
'examodule.c',
|
||||
include_directories: [inc, xorg_inc],
|
||||
dependencies: common_dep,
|
||||
link_with: libxserver_exa,
|
||||
c_args: xorg_c_args,
|
||||
install: true,
|
||||
install_dir: module_dir,
|
||||
)
|
|
@ -0,0 +1,22 @@
|
|||
glamoregl_src = [
|
||||
'../../../glamor/glamor_egl.c',
|
||||
'../../../glamor/glamor_eglmodule.c',
|
||||
'glamor_xf86_xv.c',
|
||||
]
|
||||
|
||||
shared_module(
|
||||
'glamoregl',
|
||||
glamoregl_src,
|
||||
|
||||
include_directories: [inc, xorg_inc],
|
||||
c_args: xorg_c_args,
|
||||
dependencies: [
|
||||
common_dep,
|
||||
dependency('libdrm', version: '>= 2.4.46'),
|
||||
gbm_dep,
|
||||
],
|
||||
link_with: glamor,
|
||||
|
||||
install: true,
|
||||
install_dir: module_dir,
|
||||
)
|
|
@ -0,0 +1,12 @@
|
|||
srcs_xorg_i2c = [
|
||||
'xf86i2c.c'
|
||||
]
|
||||
|
||||
xorg_i2c = static_library('xorg_i2c',
|
||||
srcs_xorg_i2c,
|
||||
include_directories: [inc, xorg_inc],
|
||||
dependencies: common_dep,
|
||||
c_args: xorg_c_args,
|
||||
)
|
||||
|
||||
install_data(['xf86i2c.h', 'i2c_def.h'], install_dir: xorgsdkdir)
|
|
@ -0,0 +1,54 @@
|
|||
srcs_xorg_int10 = [
|
||||
'helper_exec.c',
|
||||
'helper_mem.c',
|
||||
'xf86int10.c',
|
||||
'xf86int10module.c',
|
||||
]
|
||||
|
||||
int10_c_args = [xorg_c_args]
|
||||
int10_link = []
|
||||
|
||||
if host_machine.cpu() == 'i386' or host_machine.cpu() == 'x86_64'
|
||||
int10_c_args += '-D_PC'
|
||||
endif
|
||||
|
||||
if int10 == 'stub'
|
||||
srcs_xorg_int10 += 'stub.c'
|
||||
int10_c_args += '-D_VM86_LINUX'
|
||||
endif
|
||||
|
||||
if int10 == 'x86emu'
|
||||
srcs_xorg_int10 += [
|
||||
'generic.c',
|
||||
'xf86x86emu.c',
|
||||
'x86emu.c',
|
||||
]
|
||||
int10_c_args += '-D_X86EMU'
|
||||
int10_c_args += '-DNO_SYS_HEADERS'
|
||||
int10_link += xorg_x86emu
|
||||
endif
|
||||
|
||||
if int10 == 'vm86'
|
||||
srcs_xorg_int10 += [
|
||||
'vm86/linux_vm86.c',
|
||||
'linux.c',
|
||||
]
|
||||
int10_c_args += '-D_VM86_LINUX'
|
||||
endif
|
||||
|
||||
xorg_int10 = shared_module('int10',
|
||||
srcs_xorg_int10,
|
||||
include_directories: [
|
||||
inc,
|
||||
xorg_inc,
|
||||
include_directories('../x86emu')
|
||||
],
|
||||
dependencies: common_dep,
|
||||
link_with: int10_link,
|
||||
c_args: int10_c_args,
|
||||
|
||||
install: true,
|
||||
install_dir: module_dir,
|
||||
)
|
||||
|
||||
install_data('xf86int10.h', install_dir: xorgsdkdir)
|
|
@ -64,12 +64,16 @@
|
|||
#error i have no dynamic linker and i must scream
|
||||
#endif
|
||||
|
||||
#ifndef XORG_NO_SDKSYMS
|
||||
extern void *xorg_symbols[];
|
||||
#endif
|
||||
|
||||
void
|
||||
LoaderInit(void)
|
||||
{
|
||||
#ifndef XORG_NO_SDKSYMS
|
||||
LogMessageVerb(X_INFO, 2, "Loader magic: %p\n", (void *) xorg_symbols);
|
||||
#endif
|
||||
LogMessageVerb(X_INFO, 2, "Module ABI versions:\n");
|
||||
LogWrite(2, "\t%s: %d.%d\n", ABI_CLASS_ANSIC,
|
||||
GET_ABI_MAJOR(LoaderVersionInfo.ansicVersion),
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
srcs_xorg_loader = [
|
||||
'loader.c',
|
||||
'loadmod.c',
|
||||
]
|
||||
|
||||
xorg_loader = static_library('xorg_loader',
|
||||
srcs_xorg_loader,
|
||||
include_directories: [inc, xorg_inc],
|
||||
dependencies: [common_dep, dl_dep],
|
||||
c_args: xorg_c_args,
|
||||
)
|
||||
|
||||
xorg_symbol_test = executable('xorg_symbol_test',
|
||||
'symbol-test.c',
|
||||
dependencies: dl_dep,
|
||||
)
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright © 2017 Broadcom
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Small test program to see if we can successfully resolve all
|
||||
* symbols of a set of X.Org modules when they're loaded in order.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
int main (int argc, char**argv)
|
||||
{
|
||||
void *ret;
|
||||
|
||||
if (argc < 2) {
|
||||
fprintf(stderr,
|
||||
"Must pass path of Xorg executable and any "
|
||||
"modules to be loaded.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
for (int i = 1; i < argc; i++) {
|
||||
fprintf(stderr, "opening %s\n", argv[i]);
|
||||
ret = dlopen(argv[i], RTLD_GLOBAL | RTLD_NOW);
|
||||
if (!ret) {
|
||||
fprintf(stderr, "dlopen error: %s\n", dlerror());
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
xorg_inc = include_directories(
|
||||
'common',
|
||||
'ddc',
|
||||
'dri2',
|
||||
'i2c',
|
||||
'int10',
|
||||
'loader',
|
||||
'modes',
|
||||
'os-support',
|
||||
'os-support/bus',
|
||||
'parser',
|
||||
'ramdac',
|
||||
'vbe',
|
||||
'vgahw',
|
||||
)
|
||||
|
||||
xorg_c_args = []
|
||||
xorg_c_args += '-DHAVE_XORG_CONFIG_H'
|
||||
xorg_c_args += '-DXORG_NO_SDKSYMS'
|
||||
|
||||
pciaccess_dep = []
|
||||
if get_option('pciaccess')
|
||||
pciaccess_dep = dependency('pciaccess', version: '>= 0.12.901')
|
||||
endif
|
||||
|
||||
subdir('common')
|
||||
subdir('ddc')
|
||||
subdir('dixmods')
|
||||
subdir('exa')
|
||||
if gbm_dep.found()
|
||||
subdir('glamor_egl')
|
||||
endif
|
||||
subdir('i2c')
|
||||
if build_dri1
|
||||
subdir('dri')
|
||||
endif
|
||||
if build_dri2
|
||||
subdir('dri2')
|
||||
endif
|
||||
|
||||
if int10 != 'disabled'
|
||||
if int10 == 'x86emu'
|
||||
subdir('x86emu')
|
||||
endif
|
||||
subdir('int10')
|
||||
endif
|
||||
subdir('loader')
|
||||
subdir('modes')
|
||||
subdir('os-support')
|
||||
subdir('parser')
|
||||
subdir('ramdac')
|
||||
subdir('drivers/modesetting')
|
||||
|
||||
srcs_xorg = [
|
||||
'../../mi/miinitext.c'
|
||||
]
|
||||
|
||||
# Extract all the objects so that all symbols get brought into the
|
||||
# server. This prevents us from needing a global table of all symbols
|
||||
# that should be exported to Xorg modules, at the expense of all
|
||||
# symbols being included and public
|
||||
|
||||
xorg_link = [
|
||||
libxserver,
|
||||
xorg_common,
|
||||
xorg_loader,
|
||||
xorg_ddc,
|
||||
xorg_dixmods,
|
||||
xorg_i2c,
|
||||
xorg_modes,
|
||||
xorg_os_support,
|
||||
xorg_parser,
|
||||
xorg_ramdac,
|
||||
libxserver_xext_vidmode,
|
||||
libxserver_main,
|
||||
libxserver_config,
|
||||
]
|
||||
if build_dri1
|
||||
xorg_link += xorg_dri
|
||||
endif
|
||||
if build_dri2
|
||||
xorg_link += xorg_dri2
|
||||
endif
|
||||
|
||||
executable(
|
||||
'Xorg',
|
||||
srcs_xorg,
|
||||
include_directories: [inc, xorg_inc],
|
||||
link_whole: xorg_link,
|
||||
dependencies: [
|
||||
pixman_dep,
|
||||
m_dep,
|
||||
dl_dep,
|
||||
pciaccess_dep,
|
||||
sha1_dep,
|
||||
dependency('xau'),
|
||||
xdmcp_dep,
|
||||
xfont2_dep,
|
||||
xshmfence_dep,
|
||||
config_dep,
|
||||
dependency('libdrm'),
|
||||
],
|
||||
link_args: '-Wl,--export-dynamic',
|
||||
c_args: xorg_c_args,
|
||||
install: true,
|
||||
)
|
|
@ -0,0 +1,30 @@
|
|||
srcs_xorg_modes = [
|
||||
'xf86Crtc.c',
|
||||
'xf86Cursors.c',
|
||||
'xf86cvt.c',
|
||||
'xf86gtf.c',
|
||||
'xf86EdidModes.c',
|
||||
'xf86Modes.c',
|
||||
'xf86RandR12.c',
|
||||
'xf86Rotate.c',
|
||||
]
|
||||
|
||||
if build_dga
|
||||
srcs_xorg_modes += 'xf86DiDGA.c'
|
||||
endif
|
||||
|
||||
xorg_modes = static_library('xorg_modes',
|
||||
srcs_xorg_modes,
|
||||
include_directories: [inc, xorg_inc],
|
||||
dependencies: common_dep,
|
||||
c_args: xorg_c_args,
|
||||
)
|
||||
|
||||
install_data(
|
||||
[
|
||||
'xf86Crtc.h',
|
||||
'xf86Modes.h',
|
||||
'xf86RandR12.h',
|
||||
],
|
||||
install_dir: xorgsdkdir,
|
||||
)
|
|
@ -0,0 +1,125 @@
|
|||
srcs_xorg_os_support = [
|
||||
'bus/nobus.c',
|
||||
'shared/posix_tty.c',
|
||||
'shared/sigio.c',
|
||||
'shared/vidmem.c',
|
||||
]
|
||||
os_support_flags = ['-DUSESTDRES']
|
||||
|
||||
if get_option('pciaccess')
|
||||
srcs_xorg_os_support += 'bus/Pci.c'
|
||||
if host_machine.system() != 'linux' and host_machine.system() != 'solaris'
|
||||
srcs_xorg_os_support += 'bus/bsd_pci.c'
|
||||
endif
|
||||
if host_machine.cpu() == 'sparc'
|
||||
srcs_xorg_os_support += 'bus/Sbus.c'
|
||||
install_data('bus/xf86Sbus.h', install_dir: xorgsdkdir)
|
||||
endif
|
||||
endif
|
||||
|
||||
if host_machine.system() == 'linux'
|
||||
srcs_xorg_os_support += [
|
||||
'linux/lnx_agp.c',
|
||||
'linux/lnx_bell.c',
|
||||
'linux/lnx_init.c',
|
||||
'linux/lnx_kmod.c',
|
||||
'linux/lnx_platform.c',
|
||||
'linux/lnx_video.c',
|
||||
'misc/SlowBcopy.c',
|
||||
'shared/VTsw_usl.c',
|
||||
]
|
||||
if build_systemd_logind
|
||||
srcs_xorg_os_support += 'linux/systemd-logind.c'
|
||||
endif
|
||||
|
||||
# this is ugly because the code is also
|
||||
if build_apm or build_acpi
|
||||
srcs_xorg_os_support += 'linux/lnx_apm.c'
|
||||
if build_acpi
|
||||
srcs_xorg_os_support += 'linux/lnx_acpi.c'
|
||||
endif
|
||||
endif
|
||||
|
||||
os_support_flags += '-DHAVE_SYSV_IPC'
|
||||
elif host_machine.system() == 'solaris'
|
||||
srcs_xorg_os_support += [
|
||||
'solaris/sun_apm.c',
|
||||
'solaris/sun_bell.c',
|
||||
'solaris/sun_init.c',
|
||||
'solaris/sun_vid.c',
|
||||
'shared/kmod_noop.c',
|
||||
]
|
||||
|
||||
if cc.has_header('sys/vt.h')
|
||||
srcs_xorg_os_support += 'solaris/sun_VTsw.c'
|
||||
else
|
||||
srcs_xorg_os_support += 'shared/VTsw_noop.c'
|
||||
endif
|
||||
|
||||
if cc.has_header('sys/agpio.h') or cc.has_header('sys/agpgart.h')
|
||||
srcs_xorg_os_support += 'solaris/sun_agp.c'
|
||||
else
|
||||
srcs_xorg_os_support += 'shared/agp_noop.c'
|
||||
endif
|
||||
|
||||
if host_machine.cpu_family() == 'sparc'
|
||||
srcs_xorg_os_support += 'solaris/solaris-sparcv8plus.S'
|
||||
elif host_machine.cpu_family() == 'x86_64'
|
||||
srcs_xorg_os_support += 'solaris/solaris-amd64.S'
|
||||
elif host_machine.cpu_family() == 'x86'
|
||||
srcs_xorg_os_support += 'solaris/solaris-ia32.S'
|
||||
else
|
||||
error('Unknown CPU family for Solaris build')
|
||||
endif
|
||||
|
||||
os_support_flags += '-DHAVE_SYSV_IPC'
|
||||
else
|
||||
srcs_xorg_os_support += [
|
||||
'bsd/bsd_VTsw.c',
|
||||
'bsd/bsd_bell.c',
|
||||
'bsd/bsd_init.c',
|
||||
]
|
||||
|
||||
# XXX: APM
|
||||
|
||||
if host_machine.cpu_family() == 'x86_64'
|
||||
srcs_xorg_os_support += 'bsd/i386_video.c'
|
||||
elif host_machine.cpu_family() == 'x86'
|
||||
srcs_xorg_os_support += 'bsd/i386_video.c'
|
||||
elif host_machine.cpu_family() == 'arm'
|
||||
srcs_xorg_os_support += 'bsd/arm_video.c'
|
||||
elif host_machine.cpu_family() == 'powerpc'
|
||||
srcs_xorg_os_support += 'bsd/ppc_video.c'
|
||||
elif host_machine.cpu_family() == 'sparc64'
|
||||
srcs_xorg_os_support += 'bsd/sparc64_video.c'
|
||||
srcs_xorg_os_support += 'shared/ioperm_noop.c'
|
||||
elif host_machine.cpu_family() == 'alpha'
|
||||
srcs_xorg_os_support += 'bsd/alpha_video.c'
|
||||
srcs_xorg_os_support += 'bsd/bsd_ev56.c'
|
||||
endif
|
||||
|
||||
if host_machine.system() == 'freebsd'
|
||||
srcs_xorg_os_support += 'bsd/bsd_kmod.c'
|
||||
else
|
||||
srcs_xorg_os_support += 'shared/kmod_noop.c'
|
||||
endif
|
||||
|
||||
if cc.has_header('sys/agpio.h') or cc.has_header('sys/agpgart.h')
|
||||
srcs_xorg_os_support += 'linux/lnx_agp.c'
|
||||
else
|
||||
srcs_xorg_os_support += 'shared/agp_noop.c'
|
||||
endif
|
||||
endif
|
||||
|
||||
xorg_os_support = static_library('xorg_os_support',
|
||||
srcs_xorg_os_support,
|
||||
include_directories: [inc, xorg_inc],
|
||||
dependencies: [
|
||||
common_dep,
|
||||
dbus_dep,
|
||||
dependency('libdrm'),
|
||||
],
|
||||
c_args: xorg_c_args,
|
||||
)
|
||||
|
||||
install_data('bus/xf86Pci.h', install_dir: xorgsdkdir)
|
|
@ -0,0 +1,32 @@
|
|||
srcs_xorg_parser = [
|
||||
'Device.c',
|
||||
'Files.c',
|
||||
'Flags.c',
|
||||
'Input.c',
|
||||
'InputClass.c',
|
||||
'OutputClass.c',
|
||||
'Layout.c',
|
||||
'Module.c',
|
||||
'Video.c',
|
||||
'Monitor.c',
|
||||
'Pointer.c',
|
||||
'Screen.c',
|
||||
'Vendor.c',
|
||||
'read.c',
|
||||
'scan.c',
|
||||
'write.c',
|
||||
'DRI.c',
|
||||
'Extensions.c',
|
||||
]
|
||||
|
||||
xorg_parser = static_library('xorg_parser',
|
||||
srcs_xorg_parser,
|
||||
include_directories: [inc, xorg_inc],
|
||||
dependencies: common_dep,
|
||||
c_args: [
|
||||
xorg_c_args,
|
||||
'-DDATADIR="' + join_paths(get_option('prefix'), get_option('datadir')) + '"',
|
||||
],
|
||||
)
|
||||
|
||||
install_data(['xf86Parser.h', 'xf86Optrec.h'], install_dir: xorgsdkdir)
|
|
@ -0,0 +1,27 @@
|
|||
srcs_xorg_ramdac = [
|
||||
'xf86RamDac.c',
|
||||
'xf86RamDacCmap.c',
|
||||
'xf86CursorRD.c',
|
||||
'xf86HWCurs.c',
|
||||
'IBM.c',
|
||||
'BT.c',
|
||||
'TI.c',
|
||||
]
|
||||
|
||||
xorg_ramdac = static_library('xorg_ramdac',
|
||||
srcs_xorg_ramdac,
|
||||
include_directories: [inc, xorg_inc],
|
||||
dependencies: common_dep,
|
||||
c_args: xorg_c_args,
|
||||
)
|
||||
|
||||
install_data(
|
||||
[
|
||||
'BT.h',
|
||||
'IBM.h',
|
||||
'TI.h',
|
||||
'xf86Cursor.h',
|
||||
'xf86RamDac.h',
|
||||
],
|
||||
install_dir: xorgsdkdir,
|
||||
)
|
|
@ -0,0 +1,15 @@
|
|||
srcs_xorg_x86emu = [
|
||||
'debug.c',
|
||||
'decode.c',
|
||||
'fpu.c',
|
||||
'ops2.c',
|
||||
'ops.c',
|
||||
'prim_ops.c',
|
||||
'sys.c',
|
||||
]
|
||||
|
||||
xorg_x86emu = static_library('x86emu',
|
||||
srcs_xorg_x86emu,
|
||||
include_directories: [inc, xorg_inc],
|
||||
dependencies: common_dep,
|
||||
)
|
|
@ -0,0 +1,37 @@
|
|||
srcs = [
|
||||
'Args.c',
|
||||
'Color.c',
|
||||
'Cursor.c',
|
||||
'Display.c',
|
||||
'Events.c',
|
||||
'Font.c',
|
||||
'GC.c',
|
||||
'GCOps.c',
|
||||
'Handlers.c',
|
||||
'Init.c',
|
||||
'Keyboard.c',
|
||||
'Pixmap.c',
|
||||
'Pointer.c',
|
||||
'Screen.c',
|
||||
'Visual.c',
|
||||
'Window.c',
|
||||
'../../mi/miinitext.c',
|
||||
]
|
||||
|
||||
executable(
|
||||
'Xnest',
|
||||
srcs,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
common_dep,
|
||||
xnest_dep,
|
||||
],
|
||||
link_with: [
|
||||
libxserver_main,
|
||||
libxserver,
|
||||
libxserver_xi_stubs,
|
||||
libxserver_xkb_stubs,
|
||||
],
|
||||
c_args: '-DHAVE_XNEST_CONFIG_H',
|
||||
install: true,
|
||||
)
|
|
@ -0,0 +1,40 @@
|
|||
add_languages('objc')
|
||||
|
||||
srcs = [
|
||||
'X11Application.m',
|
||||
'X11Controller.m',
|
||||
'applewm.c',
|
||||
'darwin.c',
|
||||
'darwinEvents.c',
|
||||
'darwinXinput.c',
|
||||
'keysym2ucs.c',
|
||||
'quartz.c',
|
||||
'quartzCocoa.m',
|
||||
'quartzKeyboard.c',
|
||||
'quartzStartup.c',
|
||||
'quartzRandR.c',
|
||||
'console_redirect.c',
|
||||
'../../mi/miinitext.c',
|
||||
]
|
||||
|
||||
executable(
|
||||
'Xquartz',
|
||||
srcs,
|
||||
include_directories: inc,
|
||||
link_with: [
|
||||
libxserver_main,
|
||||
libxserver,
|
||||
libxserver_xkb_stubs,
|
||||
libxserver_xi_stubs,
|
||||
libxserver_glx,
|
||||
libxserver_pseudoramix,
|
||||
],
|
||||
c_args: [
|
||||
'-DXFree86Server',
|
||||
# XXXX: BUILD_DATE
|
||||
'-DXSERVER_VERSION="' + meson_project.version() + '"',
|
||||
'-DINXQUARTZ',
|
||||
'-DUSE_NEW_CLUT',
|
||||
],
|
||||
install: true,
|
||||
)
|
|
@ -0,0 +1,66 @@
|
|||
srcs = [
|
||||
'xwayland.c',
|
||||
'xwayland-input.c',
|
||||
'xwayland-cursor.c',
|
||||
'xwayland-shm.c',
|
||||
'xwayland-output.c',
|
||||
'xwayland-cvt.c',
|
||||
'xwayland-vidmode.c',
|
||||
'../../mi/miinitext.c',
|
||||
]
|
||||
|
||||
scanner_dep = dependency('wayland-scanner', native: true)
|
||||
scanner = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner'))
|
||||
|
||||
protocols_dep = dependency('wayland-protocols')
|
||||
protodir = protocols_dep.get_pkgconfig_variable('pkgdatadir')
|
||||
|
||||
pointer_xml = join_paths(protodir, 'unstable', 'pointer-constraints', 'pointer-constraints-unstable-v1.xml')
|
||||
relative_xml = join_paths(protodir, 'unstable', 'relative-pointer', 'relative-pointer-unstable-v1.xml')
|
||||
|
||||
client_header = generator(scanner,
|
||||
output : '@BASENAME@-client-protocol.h',
|
||||
arguments : ['client-header', '@INPUT@', '@OUTPUT@']
|
||||
)
|
||||
code = generator(scanner,
|
||||
output : '@BASENAME@-protocol.c',
|
||||
arguments : ['code', '@INPUT@', '@OUTPUT@']
|
||||
)
|
||||
srcs += client_header.process(relative_xml)
|
||||
srcs += client_header.process(pointer_xml)
|
||||
srcs += code.process(relative_xml)
|
||||
srcs += code.process(pointer_xml)
|
||||
|
||||
xwayland_glamor = []
|
||||
if gbm_dep.found()
|
||||
srcs += 'xwayland-glamor.c'
|
||||
if build_xv
|
||||
srcs += 'xwayland-glamor-xv.c'
|
||||
endif
|
||||
|
||||
srcs += client_header.process('drm.xml')
|
||||
srcs += code.process('drm.xml')
|
||||
xwayland_dep += gbm_dep
|
||||
xwayland_glamor += glamor
|
||||
endif
|
||||
|
||||
executable(
|
||||
'Xwayland',
|
||||
srcs,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
common_dep,
|
||||
xwayland_dep,
|
||||
],
|
||||
link_with: [
|
||||
libxserver_main,
|
||||
xwayland_glamor,
|
||||
libxserver_fb,
|
||||
libxserver,
|
||||
libxserver_xext_vidmode,
|
||||
libxserver_xkb_stubs,
|
||||
libxserver_xi_stubs,
|
||||
libxserver_glx,
|
||||
],
|
||||
install: true,
|
||||
)
|
|
@ -0,0 +1,329 @@
|
|||
|
||||
dri_dep = dependency('dri', required: build_dri2 or build_dri3)
|
||||
|
||||
conf_data = configuration_data()
|
||||
conf_data.set('_DIX_CONFIG_H_', '1')
|
||||
|
||||
conf_data.set('MONOTONIC_CLOCK', cc.compiles('''
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#ifndef CLOCK_MONOTONIC
|
||||
#error CLOCK_MONOTONIC not defined
|
||||
#endif
|
||||
''',
|
||||
name: 'CLOCK_MONOTONIC'))
|
||||
|
||||
#conf_data.set('XSERVER_DTRACE', '1') # XXX
|
||||
|
||||
if host_machine.endian() == 'little'
|
||||
conf_data.set('X_BYTE_ORDER', 'X_LITTLE_ENDIAN')
|
||||
else
|
||||
conf_data.set('X_BYTE_ORDER', 'X_BIG_ENDIAN')
|
||||
endif
|
||||
|
||||
glx_align64 = ''
|
||||
if cc.sizeof('unsigned long') == 8
|
||||
conf_data.set('_XSERVER64', '1')
|
||||
glx_align64 = '-D__GLX_ALIGN64'
|
||||
endif
|
||||
|
||||
conf_data.set('_GNU_SOURCE', '1')
|
||||
# XXX: NO_LOCAL_CLIENT_CRED
|
||||
|
||||
# autoconf checks for /dev/xf86 here, but the test should be based on
|
||||
# the target, not the build system. Could we get rid of this and just
|
||||
# ifdef for openbsd?
|
||||
conf_data.set('HAS_APERTURE_DRV', host_machine.system() == 'openbsd')
|
||||
|
||||
# XXX: USE_ALPHA_PIO and other bsd bits
|
||||
# XXX: FALLBACK_INPUT_DRIVER
|
||||
# XXX: BUNDLE_ID_PREFIX
|
||||
# XXX: HAVE_LIBDISPATCH
|
||||
conf_data.set_quoted('OSNAME', 'Linux') # XXX
|
||||
conf_data.set('HAVE_SYSV_IPC', '1') # XXX
|
||||
conf_data.set('HAVE_INPUTTHREAD', '1') # XXX
|
||||
conf_data.set('HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID', '1') # XXX
|
||||
conf_data.set('HAVE_LIBBSD', libbsd_dep.found())
|
||||
# XXX: HAVE_SYSTEMD_DAEMON
|
||||
# XXX: HAVE_LIBUDEV
|
||||
conf_data.set('CONFIG_UDEV', build_udev)
|
||||
conf_data.set('CONFIG_UDEV_KMS', build_udev)
|
||||
conf_data.set('HAVE_DBUS', build_dbus)
|
||||
conf_data.set('CONFIG_HAL', build_hal)
|
||||
conf_data.set('SYSTEMD_LOGIND', build_systemd_logind)
|
||||
conf_data.set('NEED_DBUS', build_systemd_logind or build_hal)
|
||||
conf_data.set('CONFIG_WSCONS', host_machine.system() == 'openbsd')
|
||||
|
||||
# XXX: SHMDIR is weird in autoconf, probing the build system for
|
||||
# various tmp directories. Could we replace it with C code at runtime
|
||||
# that just uses whatever directory works?
|
||||
conf_data.set_quoted('SHMDIR', '/tmp')
|
||||
|
||||
conf_data.set('HAVE_SIGACTION', '1') # XXX
|
||||
conf_data.set('BUSFAULT', '1') # XXX
|
||||
conf_data.set('XSHMFENCE', '1') # XXX
|
||||
conf_data.set('WITH_LIBDRM', '1') # XXX
|
||||
conf_data.set('GLAMOR_HAS_DRM_NAME_FROM_FD_2',
|
||||
dependency('libdrm', version: '>= 2.4.74', required: false).found())
|
||||
conf_data.set('GLXEXT', build_glx)
|
||||
conf_data.set('GLAMOR', build_glamor)
|
||||
conf_data.set('GLAMOR_HAS_GBM', gbm_dep.found())
|
||||
if gbm_dep.found() and dependency('gbm', version: '>= 10.6', required: false).found()
|
||||
conf_data.set('GLAMOR_HAS_GBM_LINEAR', build_glamor)
|
||||
endif
|
||||
|
||||
conf_data.set_quoted('SERVER_MISC_CONFIG_PATH', serverconfigdir)
|
||||
conf_data.set_quoted('PROJECTROOT', get_option('prefix'))
|
||||
conf_data.set_quoted('SYSCONFDIR', join_paths(get_option('prefix'), get_option('sysconfdir')))
|
||||
|
||||
# XXX: Stopped enumerating at COMPILEDEFAULTFONTPATH
|
||||
|
||||
conf_data.set('HASXDMAUTH', get_option('xdm-auth-1'))
|
||||
|
||||
conf_data.set('HAVE_DBM_H', cc.has_header('dbm.h'))
|
||||
conf_data.set('HAVE_DLFCN_H', cc.has_header('dlfcn.h'))
|
||||
conf_data.set('HAVE_EXECINFO_H', cc.has_header('execinfo.h'))
|
||||
conf_data.set('HAVE_FCNTL_H', cc.has_header('fcntl.h'))
|
||||
conf_data.set('HAVE_FNMATCH_H', cc.has_header('fnmatch.h'))
|
||||
conf_data.set('HAVE_LINUX_AGPGART_H', cc.has_header('linux/agpgart.h'))
|
||||
conf_data.set('HAVE_NDBM_H', cc.has_header('ndbm.h'))
|
||||
conf_data.set('HAVE_RPCSVC_DBM_H', cc.has_header('rpcsvc/dbm.h'))
|
||||
conf_data.set('HAVE_STDLIB_H', cc.has_header('stdlib.h'))
|
||||
conf_data.set('HAVE_STRING_H', cc.has_header('string.h'))
|
||||
conf_data.set('HAVE_STRINGS_H', cc.has_header('strings.h'))
|
||||
conf_data.set('HAVE_STROPTS_H', cc.has_header('stropts.h'))
|
||||
conf_data.set('HAVE_SYS_AGPGART_H', cc.has_header('sys/agpgart.h'))
|
||||
conf_data.set('HAVE_SYS_AGPIO_H', cc.has_header('sys/agpio.h'))
|
||||
conf_data.set('HAVE_SYS_UTSNAME_H', cc.has_header('sys/utsname.h'))
|
||||
conf_data.set('HAVE_UNISTD_H', cc.has_header('unistd.h'))
|
||||
|
||||
conf_data.set('HAVE_BACKTRACE', cc.has_function('backtrace'))
|
||||
conf_data.set('HAVE_CBRT', cc.has_function('cbrt'))
|
||||
conf_data.set('HAVE_EPOLL_CREATE', cc.has_function('epoll_create'))
|
||||
conf_data.set('HAVE_FFS', cc.has_function('ffs'))
|
||||
conf_data.set('HAVE_GETUID', cc.has_function('getuid'))
|
||||
conf_data.set('HAVE_GETEUID', cc.has_function('geteuid'))
|
||||
conf_data.set('HAVE_ISSETUGID', cc.has_function('issetugid'))
|
||||
conf_data.set('HAVE_GETIFADDRS', cc.has_function('getifaddrs'))
|
||||
conf_data.set('HAVE_GETPEEREID', cc.has_function('getpeereid'))
|
||||
conf_data.set('HAVE_GETPEERUCRED', cc.has_function('getpeerucred'))
|
||||
conf_data.set('HAVE_GETPROGNAME', cc.has_function('getprogname'))
|
||||
conf_data.set('HAVE_GETZONEID', cc.has_function('getzoneid'))
|
||||
conf_data.set('HAVE_MMAP', cc.has_function('mmap'))
|
||||
conf_data.set('HAVE_POLL', cc.has_function('poll'))
|
||||
conf_data.set('HAVE_POSIX_FALLOCATE', cc.has_function('posix_fallocate'))
|
||||
conf_data.set('HAVE_SETEUID', cc.has_function('seteuid'))
|
||||
conf_data.set('HAVE_SETITIMER', cc.has_function('setitimer'))
|
||||
conf_data.set('HAVE_SHMCTL64', cc.has_function('shmctl64'))
|
||||
conf_data.set('HAVE_STRCASECMP', cc.has_function('strcasecmp'))
|
||||
conf_data.set('HAVE_STRNCASECMP', cc.has_function('strncasecmp'))
|
||||
conf_data.set('HAVE_STRNDUP', cc.has_function('strndup'))
|
||||
conf_data.set('HAVE_VASPRINTF', cc.has_function('vasprintf'))
|
||||
conf_data.set('HAVE_VSNPRINTF', cc.has_function('vsnprintf'))
|
||||
conf_data.set('HAVE_WALKCONTEXT', cc.has_function('walkcontext'))
|
||||
|
||||
# Don't let X dependencies typedef 'pointer'
|
||||
conf_data.set('_XTYPEDEF_POINTER', '1')
|
||||
conf_data.set('_XITYPEDEF_POINTER', '1')
|
||||
|
||||
# XXX: Configurable?
|
||||
conf_data.set('LISTEN_TCP', '1')
|
||||
conf_data.set('LISTEN_UNIX', '1')
|
||||
conf_data.set('LISTEN_LOCAL', '1')
|
||||
conf_data.set('XTRANS_SEND_FDS', '1')
|
||||
|
||||
conf_data.set('TCPCONN', '1')
|
||||
conf_data.set('UNIXCONN', '1')
|
||||
conf_data.set('IPv6', build_ipv6)
|
||||
|
||||
conf_data.set('CLIENTIDS', '1') # XXX
|
||||
|
||||
conf_data.set('BIGREQS', '1')
|
||||
conf_data.set('COMPOSITE', '1')
|
||||
conf_data.set('DAMAGE', '1')
|
||||
conf_data.set('DBE', '1')
|
||||
conf_data.set('DPMSExtension', '1')
|
||||
conf_data.set('DRI2', build_dri2)
|
||||
conf_data.set('DRI3', build_dri3)
|
||||
conf_data.set_quoted('DRI_DRIVER_PATH', dri_dep.get_pkgconfig_variable('dridriverdir'))
|
||||
conf_data.set('HAS_SHM', '1')
|
||||
conf_data.set('MITSHM', build_mitshm)
|
||||
conf_data.set('PANORAMIX', '1')
|
||||
conf_data.set('PRESENT', '1')
|
||||
conf_data.set('RANDR', '1')
|
||||
conf_data.set('RES', build_res)
|
||||
conf_data.set('RENDER', '1')
|
||||
conf_data.set('SCREENSAVER', build_screensaver)
|
||||
conf_data.set('SHAPE', '1')
|
||||
conf_data.set('XACE', build_xace)
|
||||
conf_data.set('XCMISC', '1')
|
||||
conf_data.set('XCSECURITY', build_xsecurity)
|
||||
conf_data.set('XDMCP', get_option('xdmcp'))
|
||||
conf_data.set('XF86BIGFONT', build_xf86bigfont)
|
||||
conf_data.set('XF86DRI', build_dri1)
|
||||
conf_data.set('XF86VIDMODE', '1')
|
||||
conf_data.set('XFIXES ', '1')
|
||||
conf_data.set('XINERAMA', build_xinerama)
|
||||
conf_data.set('XINPUT', '1')
|
||||
conf_data.set('XRECORD', '1')
|
||||
conf_data.set('XSELINUX', build_xselinux)
|
||||
conf_data.set('XSYNC', '1')
|
||||
conf_data.set('XTEST', '1')
|
||||
conf_data.set('XV', build_xv)
|
||||
conf_data.set('XvExtension', build_xv)
|
||||
conf_data.set('XvMCExtension', build_xv)
|
||||
|
||||
conf_data.set('HAVE_SHA1_IN_LIBNETTLE', '1') # XXX
|
||||
|
||||
conf_data.set_quoted('XVENDORNAME', get_option('vendor_name'))
|
||||
conf_data.set_quoted('XVENDORNAMESHORT', get_option('vendor_name_short'))
|
||||
conf_data.set_quoted('__VENDORDWEBSUPPORT__', get_option('vendor_web'))
|
||||
conf_data.set_quoted('OSVENDOR', get_option('os_vendor'))
|
||||
|
||||
configure_file(output : 'dix-config.h',
|
||||
configuration : conf_data)
|
||||
|
||||
version_split = meson.project_version().split('.')
|
||||
major = version_split[0].to_int()
|
||||
minor = version_split[1].to_int()
|
||||
patch = version_split[2].to_int()
|
||||
subpatch = version_split[3].to_int()
|
||||
|
||||
release = major * 10000000 + minor * 100000 + patch * 1000 + subpatch
|
||||
|
||||
version_data = configuration_data()
|
||||
version_data.set('VENDOR_RELEASE', '@0@'.format(release))
|
||||
version_data.set_quoted('VENDOR_NAME', get_option('vendor_name'))
|
||||
version_data.set_quoted('VENDOR_NAME_SHORT', get_option('vendor_name_short'))
|
||||
version_data.set_quoted('VENDOR_WEB', get_option('vendor_web'))
|
||||
configure_file(output : 'version-config.h',
|
||||
configuration : version_data)
|
||||
|
||||
xkb_data = configuration_data()
|
||||
|
||||
xkb_data.set_quoted('XKB_BIN_DIRECTORY', join_paths(get_option('prefix'), get_option('bindir')))
|
||||
xkb_data.set_quoted('XKB_BASE_DIRECTORY', xkb_dir)
|
||||
xkb_data.set_quoted('XKB_DFLT_RULES', get_option('xkb_default_rules'))
|
||||
xkb_data.set_quoted('XKB_DFLT_MODEL', get_option('xkb_default_model'))
|
||||
xkb_data.set_quoted('XKB_DFLT_LAYOUT', get_option('xkb_default_layout'))
|
||||
xkb_data.set_quoted('XKB_DFLT_VARIANT', get_option('xkb_default_variant'))
|
||||
xkb_data.set_quoted('XKB_DFLT_OPTIONS', get_option('xkb_default_options'))
|
||||
xkb_data.set_quoted('XKM_OUTPUT_DIR', xkb_output_dir)
|
||||
|
||||
configure_file(output : 'xkb-config.h',
|
||||
configuration : xkb_data)
|
||||
|
||||
xorg_data = configuration_data()
|
||||
|
||||
xorg_data.set_quoted('XORG_BIN_DIRECTORY', get_option('bindir'))
|
||||
xorg_data.set('XORG_VERSION_CURRENT', release)
|
||||
xorg_data.set_quoted('XF86CONFIGFILE', 'xorg.conf')
|
||||
xorg_data.set_quoted('XCONFIGFILE', join_paths(get_option('sysconfdir'), 'xorg.conf'))
|
||||
xorg_data.set_quoted('XCONFIGDIR', 'xorg.conf.d')
|
||||
xorg_data.set_quoted('DEFAULT_XDG_DATA_HOME', '.local/share')
|
||||
xorg_data.set_quoted('DEFAULT_XDG_DATA_HOME_LOGDIR', 'xorg')
|
||||
xorg_data.set_quoted('DEFAULT_LOGDIR', log_dir)
|
||||
xorg_data.set_quoted('DEFAULT_LOGPREFIX', 'Xorg.')
|
||||
xorg_data.set_quoted('FALLBACK_INPUT_DRIVER', 'libinput')
|
||||
xorg_data.set_quoted('DEFAULT_MODULE_PATH', join_paths(get_option('prefix'), module_dir))
|
||||
xorg_data.set_quoted('DEFAULT_LIBRARY_PATH', get_option('libdir'))
|
||||
xorg_data.set_quoted('__XSERVERNAME__', 'Xorg')
|
||||
xorg_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess'))
|
||||
xorg_data.set_quoted('PCI_TXT_IDS_PATH', '')
|
||||
xorg_data.set('XSERVER_PLATFORM_BUS', build_udev)
|
||||
xorg_data.set('WSCONS_SUPPORT', host_machine.system() == 'netbsd' or host_machine.system() == 'openbsd')
|
||||
|
||||
if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonflybsd'
|
||||
if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
|
||||
xorg_data.set('USE_DEV_IO', true)
|
||||
endif
|
||||
# XXX: Add link to libio on alpha
|
||||
elif host_machine.system() == 'netbsd'
|
||||
# XXX: USE_ALPHA_PIO
|
||||
# XXX: Add link to libi386
|
||||
if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
|
||||
xorg_data.set('USE_I386_IOPL', true)
|
||||
endif
|
||||
elif host_machine.system() == 'openbsd'
|
||||
# XXX: Add link to libi386, libamd64
|
||||
if host_machine.cpu_family() == 'x86'
|
||||
xorg_data.set('USE_I386_IOPL', true)
|
||||
endif
|
||||
if host_machine.cpu_family() == 'x86_64'
|
||||
xorg_data.set('USE_AMD64_IOPL', true)
|
||||
endif
|
||||
endif
|
||||
|
||||
configure_file(output : 'xorg-config.h',
|
||||
input : 'xorg-config.h.meson.in',
|
||||
configuration : xorg_data)
|
||||
|
||||
if build_xorg
|
||||
install_data(
|
||||
[
|
||||
'XIstubs.h',
|
||||
'Xprintf.h',
|
||||
'callback.h',
|
||||
'client.h',
|
||||
'closestr.h',
|
||||
'closure.h',
|
||||
'colormap.h',
|
||||
'colormapst.h',
|
||||
'hotplug.h',
|
||||
'cursor.h',
|
||||
'cursorstr.h',
|
||||
'dix.h',
|
||||
'dixaccess.h',
|
||||
'dixevents.h',
|
||||
'dixfont.h',
|
||||
'dixfontstr.h',
|
||||
'dixgrabs.h',
|
||||
'dixstruct.h',
|
||||
'events.h',
|
||||
'exevents.h',
|
||||
'extension.h',
|
||||
'extinit.h',
|
||||
'extnsionst.h',
|
||||
'gc.h',
|
||||
'gcstruct.h',
|
||||
'globals.h',
|
||||
'glx_extinit.h',
|
||||
'input.h',
|
||||
'inputstr.h',
|
||||
'list.h',
|
||||
'misc.h',
|
||||
'miscstruct.h',
|
||||
'opaque.h',
|
||||
'nonsdk_extinit.h',
|
||||
'optionstr.h',
|
||||
'os.h',
|
||||
'pixmap.h',
|
||||
'pixmapstr.h',
|
||||
'privates.h',
|
||||
'property.h',
|
||||
'propertyst.h',
|
||||
'ptrveloc.h',
|
||||
'region.h',
|
||||
'regionstr.h',
|
||||
'registry.h',
|
||||
'resource.h',
|
||||
'rgb.h',
|
||||
'screenint.h',
|
||||
'scrnintstr.h',
|
||||
'selection.h',
|
||||
'servermd.h',
|
||||
'site.h',
|
||||
'validate.h',
|
||||
'displaymode.h',
|
||||
'window.h',
|
||||
'windowstr.h',
|
||||
'xkbfile.h',
|
||||
'xkbsrv.h',
|
||||
'xkbstr.h',
|
||||
'xkbrules.h',
|
||||
'xserver_poll.h',
|
||||
'xserver-properties.h',
|
||||
],
|
||||
install_dir: xorgsdkdir,
|
||||
)
|
||||
endif
|
|
@ -0,0 +1,151 @@
|
|||
/* xorg-config.h.in: not at all generated. -*- c -*-
|
||||
*
|
||||
* This file differs from xorg-server.h.in in that -server is installed
|
||||
* with the rest of the SDK for external drivers/modules to use, whereas
|
||||
* -config is for internal use only (i.e. building the DDX).
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _XORG_CONFIG_H_
|
||||
#define _XORG_CONFIG_H_
|
||||
|
||||
#include <dix-config.h>
|
||||
#include <xkb-config.h>
|
||||
|
||||
/* Building Xorg server. */
|
||||
#mesondefine XORGSERVER
|
||||
|
||||
/* Current X.Org version. */
|
||||
#mesondefine XORG_VERSION_CURRENT
|
||||
|
||||
/* Name of X server. */
|
||||
#mesondefine __XSERVERNAME__
|
||||
|
||||
/* URL to go to for support. */
|
||||
#mesondefine __VENDORDWEBSUPPORT__
|
||||
|
||||
/* Built-in output drivers. */
|
||||
#mesondefine DRIVERS
|
||||
|
||||
/* Built-in input drivers. */
|
||||
#mesondefine IDRIVERS
|
||||
|
||||
/* Path to configuration file. */
|
||||
#mesondefine XF86CONFIGFILE
|
||||
|
||||
/* Path to configuration file. */
|
||||
#mesondefine XCONFIGFILE
|
||||
|
||||
/* Name of configuration directory. */
|
||||
#mesondefine XCONFIGDIR
|
||||
|
||||
/* Path to loadable modules. */
|
||||
#mesondefine DEFAULT_MODULE_PATH
|
||||
|
||||
/* Path to installed libraries. */
|
||||
#mesondefine DEFAULT_LIBRARY_PATH
|
||||
|
||||
/* Default log location */
|
||||
#mesondefine DEFAULT_LOGDIR
|
||||
|
||||
/* Default logfile prefix */
|
||||
#mesondefine DEFAULT_LOGPREFIX
|
||||
|
||||
/* Default XDG_DATA dir under HOME */
|
||||
#mesondefine DEFAULT_XDG_DATA_HOME
|
||||
|
||||
/* Default log dir under XDG_DATA_HOME */
|
||||
#mesondefine DEFAULT_XDG_DATA_HOME_LOGDIR
|
||||
|
||||
/* Building DRI-capable DDX. */
|
||||
#mesondefine XF86DRI
|
||||
|
||||
/* Build DRI2 extension */
|
||||
#mesondefine DRI2
|
||||
|
||||
/* Define to 1 if you have the <stropts.h> header file. */
|
||||
#mesondefine HAVE_STROPTS_H
|
||||
|
||||
/* Define to 1 if you have the <sys/kd.h> header file. */
|
||||
#mesondefine HAVE_SYS_KD_H
|
||||
|
||||
/* Define to 1 if you have the <sys/vt.h> header file. */
|
||||
#mesondefine HAVE_SYS_VT_H
|
||||
|
||||
/* Define to 1 if you have the `walkcontext' function (used on Solaris for
|
||||
xorg_backtrace in hw/xfree86/common/xf86Events.c */
|
||||
#mesondefine HAVE_WALKCONTEXT
|
||||
|
||||
/* Building vgahw module */
|
||||
#mesondefine WITH_VGAHW
|
||||
|
||||
/* NetBSD PIO alpha IO */
|
||||
#mesondefine USE_ALPHA_PIO
|
||||
|
||||
/* BSD AMD64 iopl */
|
||||
#mesondefine USE_AMD64_IOPL
|
||||
|
||||
/* BSD /dev/io */
|
||||
#mesondefine USE_DEV_IO
|
||||
|
||||
/* BSD i386 iopl */
|
||||
#mesondefine USE_I386_IOPL
|
||||
|
||||
/* System is BSD-like */
|
||||
#mesondefine CSRG_BASED
|
||||
|
||||
/* System has PC console */
|
||||
#mesondefine PCCONS_SUPPORT
|
||||
|
||||
/* System has PCVT console */
|
||||
#mesondefine PCVT_SUPPORT
|
||||
|
||||
/* System has syscons console */
|
||||
#mesondefine SYSCONS_SUPPORT
|
||||
|
||||
/* System has wscons console */
|
||||
#mesondefine WSCONS_SUPPORT
|
||||
|
||||
/* System has /dev/xf86 aperture driver */
|
||||
#mesondefine HAS_APERTURE_DRV
|
||||
|
||||
/* Has backtrace support */
|
||||
#mesondefine HAVE_BACKTRACE
|
||||
|
||||
/* Name of the period field in struct kbd_repeat */
|
||||
#mesondefine LNX_KBD_PERIOD_NAME
|
||||
|
||||
/* Have execinfo.h */
|
||||
#mesondefine HAVE_EXECINFO_H
|
||||
|
||||
/* Define to 1 if you have the <sys/mkdev.h> header file. */
|
||||
#mesondefine HAVE_SYS_MKDEV_H
|
||||
|
||||
/* Path to text files containing PCI IDs */
|
||||
#mesondefine PCI_TXT_IDS_PATH
|
||||
|
||||
/* Build with libdrm support */
|
||||
#mesondefine WITH_LIBDRM
|
||||
|
||||
/* Use libpciaccess */
|
||||
#mesondefine XSERVER_LIBPCIACCESS
|
||||
|
||||
/* Have setugid */
|
||||
#mesondefine HAVE_ISSETUGID
|
||||
|
||||
/* Have getresuid */
|
||||
#mesondefine HAVE_GETRESUID
|
||||
|
||||
/* Have X server platform bus support */
|
||||
#mesondefine XSERVER_PLATFORM_BUS
|
||||
|
||||
/* Define to 1 if you have the `seteuid' function. */
|
||||
#mesondefine HAVE_SETEUID
|
||||
|
||||
/* Support APM/ACPI power management in the server */
|
||||
#mesondefine XF86PM
|
||||
|
||||
/* Fallback input driver if the assigned driver fails */
|
||||
#mesondefine FALLBACK_INPUT_DRIVER
|
||||
|
||||
#endif /* _XORG_CONFIG_H_ */
|
|
@ -0,0 +1,361 @@
|
|||
project('xserver', 'c',
|
||||
default_options: ['buildtype=debugoptimized'],
|
||||
version: '1.19.99.1',
|
||||
meson_version: '>= 0.40.0',
|
||||
)
|
||||
add_project_arguments('-DHAVE_DIX_CONFIG_H', language: 'c')
|
||||
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')
|
||||
|
||||
# Quiet some EXA warnings.
|
||||
add_global_arguments('-Wno-discarded-qualifiers', language : 'c')
|
||||
|
||||
xproto_dep = dependency('xproto', version: '>= 7.0.31')
|
||||
randrproto_dep = dependency('randrproto', version: '>= 1.5.0')
|
||||
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')
|
||||
xf86driproto_dep = dependency('xf86driproto', version: '>= 2.1.0')
|
||||
dri2proto_dep = dependency('dri2proto', version: '>= 2.8')
|
||||
dri3proto_dep = dependency('dri3proto', version: '>= 1.0')
|
||||
xineramaproto_dep = dependency('xineramaproto')
|
||||
xf86bigfontproto_dep = dependency('xf86bigfontproto', version: '>= 1.2.0')
|
||||
xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1')
|
||||
xf86vidmodeproto_dep = dependency('xf86vidmodeproto', version: '>= 2.2.99.1')
|
||||
windowswmproto_dep = dependency('windowswmproto', required: false)
|
||||
applewmproto_dep = dependency('applewmproto', version: '>= 1.4', required: false)
|
||||
xshmfence_dep = dependency('xshmfence', version: '>= 1.1')
|
||||
|
||||
pixman_dep = dependency('pixman-1')
|
||||
libbsd_dep = dependency('libbsd', required: false)
|
||||
xkbfile_dep = dependency('xkbfile')
|
||||
xfont2_dep = dependency('xfont2', version: '>= 2.0')
|
||||
nettle_dep = dependency('nettle', required: false)
|
||||
|
||||
dbus_required = get_option('systemd_logind') == 'yes'
|
||||
dbus_dep = dependency('dbus-1', version: '>= 1.0', required: dbus_required)
|
||||
|
||||
# Resolve default values of some options
|
||||
xkb_dir = get_option('xkb_dir')
|
||||
if xkb_dir == ''
|
||||
xkb_dir = join_paths(get_option('prefix'), 'share/X11/xkb')
|
||||
endif
|
||||
|
||||
xkb_output_dir = get_option('xkb_output_dir')
|
||||
if xkb_output_dir == ''
|
||||
xkb_output_dir = join_paths(get_option('prefix'), 'share/X11/xkb/compiled')
|
||||
endif
|
||||
|
||||
hal_option = get_option('hal')
|
||||
glamor_option = get_option('glamor')
|
||||
|
||||
build_udev = get_option('udev')
|
||||
if host_machine.system() == 'windows'
|
||||
build_udev = false
|
||||
hal_option = 'no'
|
||||
endif
|
||||
|
||||
build_dbus = dbus_dep.found()
|
||||
|
||||
if get_option('systemd_logind') == 'auto'
|
||||
build_systemd_logind = build_udev and build_dbus
|
||||
else
|
||||
build_systemd_logind = get_option('systemd_logind') == 'yes'
|
||||
endif
|
||||
|
||||
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
|
||||
build_xorg = get_option('xorg') == 'yes'
|
||||
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')
|
||||
if get_option('xwayland') != 'no'
|
||||
xwayland_required = get_option('xwayland') == 'yes'
|
||||
|
||||
xwayland_dep = [
|
||||
dependency('wayland-client', version: '>= 1.3.0', required: xwayland_required),
|
||||
dependency('wayland-protocols', version: '>= 1.1.0', required: xwayland_required),
|
||||
dependency('libdrm', version: '>= 2.3.1', required: xwayland_required),
|
||||
dependency('epoxy', required: xwayland_required),
|
||||
]
|
||||
|
||||
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')
|
||||
if get_option('xnest') != 'no'
|
||||
xnest_required = get_option('xnest') == 'yes'
|
||||
|
||||
xnest_dep = [
|
||||
dependency('xext', version: '>= 1.0.99.4', required: xnest_required),
|
||||
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
|
||||
|
||||
# XXX: Finish these.
|
||||
build_xquartz = false
|
||||
build_xwin = false
|
||||
|
||||
if get_option('ipv6') == 'auto'
|
||||
build_ipv6 = cc.has_function('getaddrinfo')
|
||||
else
|
||||
build_ipv6 = get_option('ipv6') == 'yes'
|
||||
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
|
||||
|
||||
hal_dep = ''
|
||||
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
|
||||
build_hal = hal_option == 'yes'
|
||||
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
|
||||
|
||||
udev_dep = []
|
||||
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
|
||||
|
||||
module_dir = get_option('module_dir')
|
||||
if module_dir == ''
|
||||
module_dir = join_paths(get_option('libdir'), 'xorg/modules')
|
||||
endif
|
||||
|
||||
bulid_wayland = false
|
||||
|
||||
if glamor_option == 'auto'
|
||||
build_glamor = build_xorg or build_wayland
|
||||
else
|
||||
build_glamor = get_option('glamor') == 'yes'
|
||||
endif
|
||||
|
||||
gbm_dep = []
|
||||
if build_glamor
|
||||
gbm_dep = dependency('gbm', version: '>= 10.2', required: false)
|
||||
if gbm_dep.found()
|
||||
gbm_linear_dep = dependency('gbm', version: '>= 10.6', required: false)
|
||||
endif
|
||||
endif
|
||||
|
||||
# XXX: Add more sha1 options, because Linux is about choice
|
||||
sha1_dep = nettle_dep
|
||||
|
||||
xdmcp_dep = ''
|
||||
if get_option('xdmcp')
|
||||
xdmcp_dep = dependency('xdmcp')
|
||||
endif
|
||||
|
||||
build_glx = get_option('glx')
|
||||
|
||||
# XXX: Allow configuration of these.
|
||||
build_apm = false
|
||||
build_acpi = false
|
||||
build_dri1 = true
|
||||
build_dri2 = true
|
||||
build_dri3 = true
|
||||
build_dpms = true
|
||||
build_mitshm = true
|
||||
build_res = true
|
||||
build_screensaver = true
|
||||
build_xace = true
|
||||
build_xsecurity = true
|
||||
build_xf86bigfont = true
|
||||
build_xinerama = true
|
||||
build_xselinux = false
|
||||
build_xv = true
|
||||
build_dga = false
|
||||
|
||||
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,
|
||||
|
||||
videoproto_dep,
|
||||
compositeproto_dep,
|
||||
recordproto_dep,
|
||||
scrnsaverproto_dep,
|
||||
resourceproto_dep,
|
||||
xf86driproto_dep,
|
||||
dri2proto_dep,
|
||||
dri3proto_dep,
|
||||
xineramaproto_dep,
|
||||
xf86bigfontproto_dep,
|
||||
xf86dgaproto_dep,
|
||||
xf86vidmodeproto_dep,
|
||||
windowswmproto_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',
|
||||
)
|
||||
|
||||
serverconfigdir = join_paths(get_option('libdir'), '/xorg')
|
||||
|
||||
# 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')
|
||||
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_dri3,
|
||||
libxserver_randr,
|
||||
libxserver_miext_damage,
|
||||
libxserver_render,
|
||||
libxserver_present,
|
||||
libxserver_xext,
|
||||
libxserver_miext_sync,
|
||||
libxserver_xfixes,
|
||||
libxserver_xi,
|
||||
libxserver_xkb,
|
||||
libxserver_record,
|
||||
|
||||
libxserver_os,
|
||||
]
|
||||
|
||||
subdir('hw')
|
|
@ -0,0 +1,46 @@
|
|||
option('xorg', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
|
||||
description: 'Enable Xorg X Server')
|
||||
option('xephyr', type: 'boolean', value: false,
|
||||
description: 'Enable Xephyr nexted X server')
|
||||
option('xwayland', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
|
||||
description: 'Enable XWayland X server')
|
||||
option('glamor', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
|
||||
description: 'Enable glamor (default yes for Xorg/Xwayland builds)')
|
||||
option('xnest', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
|
||||
description: 'Enable Xnest nested X server')
|
||||
option('dmx', type: 'boolean', value: false,
|
||||
description: 'Enable DMX nested X server')
|
||||
|
||||
option('log_dir', type: 'string')
|
||||
option('module_dir', type: 'string',
|
||||
description: 'X.Org modules directory')
|
||||
|
||||
option('glx', type: 'boolean', value: true)
|
||||
option('xdmcp', type: 'boolean', value: true)
|
||||
option('xdm-auth-1', type: 'boolean', value: true)
|
||||
option('ipv6', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto')
|
||||
|
||||
option('xkb_dir', type: 'string')
|
||||
option('xkb_output_dir', type: 'string')
|
||||
option('xkb_default_rules', type: 'string', value: 'evdev')
|
||||
option('xkb_default_model', type: 'string', value: 'pc105')
|
||||
option('xkb_default_layout', type: 'string', value: 'us')
|
||||
option('xkb_default_variant', type: 'string')
|
||||
option('xkb_default_options', type: 'string')
|
||||
|
||||
option('vendor_name', type: 'string', value: 'The X.Org Foundation')
|
||||
option('vendor_name_short', type: 'string', value: 'X.Org')
|
||||
option('vendor_web', type: 'string', value: 'http://wiki.x.org')
|
||||
option('os_vendor', type: 'string', value: '')
|
||||
|
||||
option('int10', type: 'combo', choices: ['stub', 'x86emu', 'vm86', 'auto', 'disabled'],
|
||||
value: 'auto',
|
||||
description: 'Xorg int10 backend (default: usually x86emu)')
|
||||
|
||||
option('pciaccess', type: 'boolean', value: 'true',
|
||||
description: 'Xorg pciaccess support')
|
||||
option('udev', type: 'boolean', value: 'true')
|
||||
option('hal', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
|
||||
description: 'Enable HAL integration')
|
||||
option('systemd_logind', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
|
||||
description: 'Enable systemd-logind integration')
|
|
@ -0,0 +1,39 @@
|
|||
srcs_mi = [
|
||||
'miarc.c',
|
||||
'mibitblt.c',
|
||||
'micmap.c',
|
||||
'micopy.c',
|
||||
'midash.c',
|
||||
'midispcur.c',
|
||||
'mieq.c',
|
||||
'miexpose.c',
|
||||
'mifillarc.c',
|
||||
'mifillrct.c',
|
||||
'migc.c',
|
||||
'miglblt.c',
|
||||
'mioverlay.c',
|
||||
'mipointer.c',
|
||||
'mipoly.c',
|
||||
'mipolypnt.c',
|
||||
'mipolyrect.c',
|
||||
'mipolyseg.c',
|
||||
'mipolytext.c',
|
||||
'mipushpxl.c',
|
||||
'miscrinit.c',
|
||||
'misprite.c',
|
||||
'mivaltree.c',
|
||||
'miwideline.c',
|
||||
'miwindow.c',
|
||||
'mizerarc.c',
|
||||
'mizerclip.c',
|
||||
'mizerline.c',
|
||||
]
|
||||
|
||||
libxserver_mi = static_library('libxserver_mi',
|
||||
srcs_mi,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
common_dep,
|
||||
m_dep,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,9 @@
|
|||
srcs_miext_damage = [
|
||||
'damage.c',
|
||||
]
|
||||
|
||||
libxserver_miext_damage = static_library('libxserver_miext_damage',
|
||||
srcs_miext_damage,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
|
@ -0,0 +1,32 @@
|
|||
srcs_miext_shadow = [
|
||||
'shadow.c',
|
||||
'sh3224.c',
|
||||
'shafb4.c',
|
||||
'shafb8.c',
|
||||
'shiplan2p4.c',
|
||||
'shiplan2p8.c',
|
||||
'shpacked.c',
|
||||
'shplanar8.c',
|
||||
'shplanar.c',
|
||||
'shrot16pack_180.c',
|
||||
'shrot16pack_270.c',
|
||||
'shrot16pack_270YX.c',
|
||||
'shrot16pack_90.c',
|
||||
'shrot16pack_90YX.c',
|
||||
'shrot16pack.c',
|
||||
'shrot32pack_180.c',
|
||||
'shrot32pack_270.c',
|
||||
'shrot32pack_90.c',
|
||||
'shrot32pack.c',
|
||||
'shrot8pack_180.c',
|
||||
'shrot8pack_270.c',
|
||||
'shrot8pack_90.c',
|
||||
'shrot8pack.c',
|
||||
'shrotate.c',
|
||||
]
|
||||
|
||||
libxserver_miext_shadow = static_library('libxserver_miext_shadow',
|
||||
srcs_miext_shadow,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
|
@ -0,0 +1,17 @@
|
|||
srcs_miext_sync = [
|
||||
'misync.c',
|
||||
'misyncfd.c',
|
||||
]
|
||||
|
||||
if build_dri3
|
||||
srcs_miext_sync += 'misyncshm.c'
|
||||
endif
|
||||
|
||||
libxserver_miext_sync = static_library('libxserver_miext_sync',
|
||||
srcs_miext_sync,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
common_dep,
|
||||
xshmfence_dep,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,65 @@
|
|||
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',
|
||||
]
|
||||
|
||||
# Wrapper code for missing C library functions
|
||||
if not cc.has_function('reallocarray')
|
||||
srcs_os += 'reallocarray.c'
|
||||
endif
|
||||
if not cc.has_function('strcasecmp')
|
||||
srcs_os += 'strcasecmp.c'
|
||||
endif
|
||||
if not cc.has_function('strcasestr')
|
||||
srcs_os += 'strcasestr.c'
|
||||
endif
|
||||
if not cc.has_function('strlcat')
|
||||
srcs_os += 'strlcat.c'
|
||||
endif
|
||||
if not cc.has_function('strlcpy')
|
||||
srcs_os += 'strlcpy.c'
|
||||
endif
|
||||
if not cc.has_function('strndup')
|
||||
srcs_os += 'strndup.c'
|
||||
endif
|
||||
if not cc.has_function('timingsafe_memcmp')
|
||||
srcs_os += 'timingsafe_memcmp.c'
|
||||
endif
|
||||
|
||||
if cc.has_function('poll')
|
||||
srcs_os += 'xserver_poll.c'
|
||||
endif
|
||||
if cc.has_function('sigaction')
|
||||
srcs_os += 'busfault.c'
|
||||
endif
|
||||
|
||||
if get_option('xdmcp')
|
||||
srcs_os += 'xdmcp.c'
|
||||
endif
|
||||
|
||||
libxserver_os = static_library('libxserver_os',
|
||||
srcs_os,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
common_dep,
|
||||
dl_dep,
|
||||
sha1_dep,
|
||||
dependency('xau')
|
||||
],
|
||||
)
|
|
@ -0,0 +1,19 @@
|
|||
srcs_present = [
|
||||
'present.c',
|
||||
'present_event.c',
|
||||
'present_fake.c',
|
||||
'present_fence.c',
|
||||
'present_notify.c',
|
||||
'present_request.c',
|
||||
'present_screen.c',
|
||||
]
|
||||
|
||||
libxserver_present = static_library('libxserver_present',
|
||||
srcs_present,
|
||||
include_directories: inc,
|
||||
dependencies: [
|
||||
common_dep,
|
||||
dependency('presentproto', version: '>= 1.0')
|
||||
],
|
||||
c_args: '-DHAVE_XORG_CONFIG_H'
|
||||
)
|
|
@ -0,0 +1,5 @@
|
|||
libxserver_pseudoramix = static_library('libxserver_pseudoramiX',
|
||||
'pseudoramiX.c',
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
|
@ -0,0 +1,26 @@
|
|||
srcs_randr = [
|
||||
'randr.c',
|
||||
'rrcrtc.c',
|
||||
'rrdispatch.c',
|
||||
'rrinfo.c',
|
||||
'rrmode.c',
|
||||
'rrmonitor.c',
|
||||
'rroutput.c',
|
||||
'rrpointer.c',
|
||||
'rrproperty.c',
|
||||
'rrprovider.c',
|
||||
'rrproviderproperty.c',
|
||||
'rrscreen.c',
|
||||
'rrsdispatch.c',
|
||||
'rrtransform.c',
|
||||
]
|
||||
|
||||
if build_xinerama
|
||||
srcs_randr += 'rrxinerama.c'
|
||||
endif
|
||||
|
||||
libxserver_randr = static_library('libxserver_randr',
|
||||
srcs_randr,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
|
@ -0,0 +1,10 @@
|
|||
srcs_record = [
|
||||
'record.c',
|
||||
'set.c',
|
||||
]
|
||||
|
||||
libxserver_record = static_library('libxserver_record',
|
||||
srcs_record,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
|
@ -0,0 +1,19 @@
|
|||
srcs_render = [
|
||||
'animcur.c',
|
||||
'filter.c',
|
||||
'glyph.c',
|
||||
'matrix.c',
|
||||
'miindex.c',
|
||||
'mipict.c',
|
||||
'mirect.c',
|
||||
'mitrap.c',
|
||||
'mitri.c',
|
||||
'picture.c',
|
||||
'render.c',
|
||||
]
|
||||
|
||||
libxserver_render = static_library('libxserver_render',
|
||||
srcs_render,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
|
@ -0,0 +1,13 @@
|
|||
srcs_xfixes = [
|
||||
'cursor.c',
|
||||
'region.c',
|
||||
'saveset.c',
|
||||
'select.c',
|
||||
'xfixes.c',
|
||||
]
|
||||
|
||||
libxserver_xfixes = static_library('libxserver_xfixes',
|
||||
srcs_xfixes,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
|
@ -0,0 +1,42 @@
|
|||
srcs_xkb = [
|
||||
'ddxBeep.c',
|
||||
'ddxCtrls.c',
|
||||
'ddxLEDs.c',
|
||||
'ddxLoad.c',
|
||||
'maprules.c',
|
||||
'xkmread.c',
|
||||
'xkbtext.c',
|
||||
'xkbfmisc.c',
|
||||
'xkbout.c',
|
||||
'xkb.c',
|
||||
'xkbUtils.c',
|
||||
'xkbEvents.c',
|
||||
'xkbAccessX.c',
|
||||
'xkbSwap.c',
|
||||
'xkbLEDs.c',
|
||||
'xkbInit.c',
|
||||
'xkbActions.c',
|
||||
'xkbPrKeyEv.c',
|
||||
'XKBMisc.c',
|
||||
'XKBAlloc.c',
|
||||
'XKBGAlloc.c',
|
||||
'XKBMAlloc.c',
|
||||
]
|
||||
|
||||
libxserver_xkb = static_library('libxserver_xkb',
|
||||
srcs_xkb,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
||||
|
||||
srcs_xkb_stubs = [
|
||||
'ddxKillSrv.c',
|
||||
'ddxPrivate.c',
|
||||
'ddxVT.c',
|
||||
]
|
||||
|
||||
libxserver_xkb_stubs = static_library('libxserver_xkb_stubs',
|
||||
srcs_xkb_stubs,
|
||||
include_directories: inc,
|
||||
dependencies: common_dep,
|
||||
)
|
Loading…
Reference in New Issue