"Fossies" - the Fresh Open Source Software Archive

Member "xorg-server-1.20.8/meson.build" (29 Mar 2020, 19628 Bytes) of package /linux/misc/xorg-server-1.20.8.tar.bz2:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "meson.build": 1.20.7_vs_1.20.8.

    1 project('xserver', 'c',
    2         default_options: [
    3             'buildtype=debugoptimized',
    4             'c_std=gnu99',
    5         ],
    6         version: '1.20.8',
    7         meson_version: '>= 0.42.0',
    8 )
    9 add_project_arguments('-DHAVE_DIX_CONFIG_H', language: 'c')
   10 cc = meson.get_compiler('c')
   11 
   12 add_global_arguments('-fno-strict-aliasing', language : 'c')
   13 add_global_arguments('-fvisibility=hidden', language : 'c')
   14 
   15 add_global_link_arguments('-fvisibility=hidden', language : 'c')
   16 
   17 if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
   18     test_wflags = [
   19         '-Wall',
   20         '-Wpointer-arith',
   21         '-Wmissing-declarations',
   22         '-Wformat=2',
   23         '-Wstrict-prototypes',
   24         '-Wmissing-prototypes',
   25         '-Wnested-externs',
   26         '-Wbad-function-cast',
   27         '-Wold-style-definition',
   28         '-Wunused',
   29         '-Wuninitialized',
   30         '-Wshadow',
   31         '-Wmissing-noreturn',
   32         '-Wmissing-format-attribute',
   33         '-Wredundant-decls',
   34         '-Werror=implicit',
   35         '-Werror=nonnull',
   36         '-Werror=init-self',
   37         '-Werror=main',
   38         '-Werror=missing-braces',
   39         '-Werror=sequence-point',
   40         '-Werror=return-type',
   41         '-Werror=trigraphs',
   42         '-Werror=array-bounds',
   43         '-Werror=write-strings',
   44         '-Werror=address',
   45         '-Werror=int-to-pointer-cast',
   46         '-Werror=pointer-to-int-cast',
   47     ]
   48 else
   49     test_wflags = []
   50 endif
   51 
   52 common_wflags = []
   53 foreach wflag: test_wflags
   54     if cc.has_argument(wflag)
   55         common_wflags += [ wflag ]
   56     endif
   57 endforeach
   58 
   59 add_global_arguments(common_wflags, language : 'c')
   60 
   61 xproto_dep = dependency('xproto', version: '>= 7.0.31')
   62 randrproto_dep = dependency('randrproto', version: '>= 1.6.0')
   63 renderproto_dep = dependency('renderproto', version: '>= 0.11')
   64 xextproto_dep = dependency('xextproto', version: '>= 7.2.99.901')
   65 inputproto_dep = dependency('inputproto', version: '>= 2.3')
   66 kbproto_dep = dependency('kbproto', version: '>= 1.0.3')
   67 fontsproto_dep = dependency('fontsproto', version: '>= 2.1.3')
   68 fixesproto_dep = dependency('fixesproto', version: '>= 5.0')
   69 damageproto_dep = dependency('damageproto', version: '>= 1.1')
   70 xcmiscproto_dep = dependency('xcmiscproto', version: '>= 1.2.0')
   71 bigreqsproto_dep = dependency('bigreqsproto', version: '>= 1.1.0')
   72 xtrans_dep = dependency('xtrans', version: '>= 1.3.5')
   73 
   74 videoproto_dep = dependency('videoproto')
   75 compositeproto_dep = dependency('compositeproto', version: '>= 0.4')
   76 recordproto_dep = dependency('recordproto', version: '>= 1.13.99.1')
   77 scrnsaverproto_dep = dependency('scrnsaverproto', version: '>= 1.1')
   78 resourceproto_dep = dependency('resourceproto', version: '>= 1.2.0')
   79 xf86driproto_dep = dependency('xf86driproto', version: '>= 2.1.0', required: get_option('dri1') == 'true')
   80 dri2proto_dep = dependency('dri2proto', version: '>= 2.8', required: get_option('dri2') == 'true')
   81 dri3proto_dep = dependency('dri3proto', version: '>= 1.2', required: get_option('dri3') == 'true')
   82 xineramaproto_dep = dependency('xineramaproto')
   83 xf86bigfontproto_dep = dependency('xf86bigfontproto', version: '>= 1.2.0')
   84 xf86vidmodeproto_dep = dependency('xf86vidmodeproto', version: '>= 2.2.99.1', required: false)
   85 windowswmproto_dep = dependency('windowswmproto', required: false)
   86 applewmproto_dep = dependency('applewmproto', version: '>= 1.4', required: false)
   87 xshmfence_dep = dependency('xshmfence', version: '>= 1.1', required: false)
   88 
   89 pixman_dep = dependency('pixman-1')
   90 libbsd_dep = dependency('libbsd', required: false)
   91 xkbcomp_dep = dependency('xkbcomp', required: false)
   92 xkbfile_dep = dependency('xkbfile')
   93 xfont2_dep = dependency('xfont2', version: '>= 2.0')
   94 nettle_dep = dependency('nettle')
   95 
   96 dbus_required = get_option('systemd_logind') == 'true'
   97 dbus_dep = dependency('dbus-1', version: '>= 1.0', required: dbus_required)
   98 
   99 build_hashtable = false
  100 
  101 # Resolve default values of some options
  102 xkb_dir = get_option('xkb_dir')
  103 if xkb_dir == ''
  104     xkb_dir = xkbcomp_dep.get_pkgconfig_variable('xkbconfigdir')
  105     if xkb_dir == ''
  106         xkb_dir = join_paths(get_option('prefix'), 'share/X11/xkb')
  107     endif
  108 endif
  109 
  110 xkb_output_dir = get_option('xkb_output_dir')
  111 if xkb_output_dir == ''
  112     xkb_output_dir = join_paths(xkb_dir, 'compiled')
  113 endif
  114 
  115 xkb_bin_dir = get_option('xkb_bin_dir')
  116 if xkb_bin_dir == ''
  117     xkb_bin_dir = xkbcomp_dep.get_pkgconfig_variable('bindir')
  118     if xkb_bin_dir == ''
  119         xkb_bin_dir = join_paths(get_option('prefix'), get_option('bindir'))
  120     endif
  121 endif
  122 
  123 dfp = get_option('default_font_path')
  124 if dfp == ''
  125     fontutil_dep = dependency('fontutil')
  126     fontrootdir = fontutil_dep.get_pkgconfig_variable('fontrootdir')
  127     default_font_path = ','.join([
  128         join_paths(fontrootdir, 'misc'),
  129         join_paths(fontrootdir, 'TTF'),
  130         join_paths(fontrootdir, 'OTF'),
  131         join_paths(fontrootdir, 'Type1'),
  132         join_paths(fontrootdir, '100dpi'),
  133         join_paths(fontrootdir, '75dpi'),
  134     ])
  135 else
  136     default_font_path = dfp
  137 endif
  138 
  139 hal_option = get_option('hal')
  140 glamor_option = get_option('glamor')
  141 
  142 build_udev = get_option('udev')
  143 if host_machine.system() == 'windows'
  144     build_udev = false
  145     hal_option = 'false'
  146 endif
  147 
  148 if get_option('systemd_logind') == 'auto'
  149     build_systemd_logind = build_udev and dbus_dep.found()
  150 else
  151     build_systemd_logind = get_option('systemd_logind') == 'true'
  152 endif
  153 
  154 build_xorg = false
  155 if (host_machine.system() != 'darwin' and
  156     host_machine.system() != 'windows')
  157     if get_option('xorg') == 'auto'
  158         build_xorg = (host_machine.system() != 'darwin' and
  159                       host_machine.system() != 'windows')
  160     else
  161         build_xorg = get_option('xorg') == 'true'
  162     endif
  163 endif
  164 xorgsdkdir = join_paths(get_option('prefix'), get_option('includedir'), 'xorg')
  165 
  166 build_xwayland = false
  167 if (host_machine.system() != 'darwin' and
  168     host_machine.system() != 'windows')
  169     if get_option('xwayland') != 'false'
  170         xwayland_required = get_option('xwayland') == 'true'
  171 
  172         xwayland_dep = [
  173             dependency('wayland-client', version: '>= 1.3.0', required: xwayland_required),
  174             dependency('wayland-protocols', version: '>= 1.10', required: xwayland_required),
  175             dependency('libdrm', version: '>= 2.4.89', required: xwayland_required),
  176             dependency('epoxy', required: xwayland_required),
  177         ]
  178 
  179         build_xwayland = true
  180         # check for all the deps being found, to handle 'auto' mode.
  181         foreach d: xwayland_dep
  182             if not d.found()
  183                 build_xwayland = false
  184             endif
  185         endforeach
  186     endif
  187 endif
  188 
  189 build_xnest = false
  190 if (host_machine.system() != 'darwin' and
  191     host_machine.system() != 'windows')
  192     if get_option('xnest') != 'false'
  193         xnest_required = get_option('xnest') == 'true'
  194 
  195         xnest_dep = [
  196             dependency('xext', version: '>= 1.0.99.4', required: xnest_required),
  197             dependency('x11', required: xnest_required),
  198             dependency('xau', required: xnest_required),
  199         ]
  200 
  201         build_xnest = true
  202         # check for all the deps being found, to handle 'auto' mode.
  203         foreach d: xnest_dep
  204             if not d.found()
  205                 build_xnest = false
  206             endif
  207         endforeach
  208     endif
  209 endif
  210 
  211 build_xwin = false
  212 if get_option('xwin') == 'auto'
  213     if (host_machine.system() == 'cygwin' or
  214         host_machine.system() == 'windows')
  215             build_xwin = true
  216     endif
  217 else
  218     build_xwin = get_option('xwin') == 'true'
  219 endif
  220 
  221 # XXX: Finish these.
  222 build_xquartz = false
  223 
  224 if get_option('ipv6') == 'auto'
  225     build_ipv6 = cc.has_function('getaddrinfo')
  226 else
  227     build_ipv6 = get_option('ipv6') == 'true'
  228 endif
  229 
  230 int10 = get_option('int10')
  231 if int10 == 'auto'
  232     int10 = 'x86emu'
  233     if host_machine.cpu() == 'powerpc' and host_machine.system() == 'freebsd'
  234         int10 = 'stub'
  235     endif
  236     if host_machine.cpu() == 'arm'
  237         int10 = 'stub'
  238     endif
  239 endif
  240 
  241 hal_dep = []
  242 if hal_option == 'auto'
  243     if not build_udev
  244         hal_dep = dependency('hal', required: false)
  245         build_hal = hal_dep.found()
  246     else
  247         build_hal = false
  248     endif
  249 else
  250     build_hal = hal_option == 'true'
  251     if build_hal
  252         hal_dep = dependency('hal')
  253     endif
  254 endif
  255 
  256 if build_udev and build_hal
  257     error('Hotplugging through both libudev and hal not allowed')
  258 endif
  259 
  260 build_dbus = build_hal or build_systemd_logind
  261 
  262 udev_dep = dependency('', required:false)
  263 if build_udev
  264     udev_dep = dependency('libudev', version: '>= 143')
  265 endif
  266 
  267 log_dir = get_option('log_dir')
  268 if log_dir == ''
  269     log_dir = join_paths(get_option('prefix'), get_option('localstatedir'), 'log')
  270 endif
  271 
  272 module_dir = join_paths(get_option('libdir'), get_option('module_dir'))
  273 
  274 if glamor_option == 'auto'
  275     build_glamor = build_xorg or build_xwayland
  276 else
  277     build_glamor = get_option('glamor') == 'true'
  278 endif
  279 
  280 gbm_dep = dependency('', required: false)
  281 epoxy_dep = dependency('', required: false)
  282 if build_glamor
  283     gbm_dep = dependency('gbm', version: '>= 10.2', required: false)
  284     epoxy_dep = dependency('epoxy', required: false)
  285 endif
  286 
  287 eglstream_option = get_option('xwayland_eglstream')
  288 if build_xwayland and build_glamor
  289     eglstream_dep = dependency('wayland-eglstream-protocols', required:false)
  290     if eglstream_option == 'auto'
  291         build_eglstream = eglstream_dep.found()
  292     else
  293         build_eglstream = eglstream_option == 'true'
  294         if build_eglstream and not eglstream_dep.found()
  295             error('glamor EGLStream support requested, but wayland-eglstream-protocols not found')
  296         endif
  297     endif
  298 else
  299     build_eglstream = false
  300 endif
  301 
  302 # XXX: Add more sha1 options, because Linux is about choice
  303 sha1_dep = nettle_dep
  304 
  305 xdmcp_dep = dependency('', required : false)
  306 if get_option('xdmcp')
  307     xdmcp_dep = dependency('xdmcp')
  308 endif
  309 
  310 has_xdm_auth = get_option('xdm-auth-1')
  311 
  312 if not xdmcp_dep.found()
  313   has_xdm_auth = false
  314 endif
  315 
  316 build_glx = get_option('glx')
  317 if build_glx
  318     build_hashtable = true
  319 endif
  320 
  321 libdrm_dep = dependency('libdrm', version: '>= 2.4.89', required: false)
  322 
  323 if get_option('dri1') == 'auto'
  324     build_dri1 = xf86driproto_dep.found() and libdrm_dep.found()
  325 else
  326     build_dri1 = get_option('dri1') == 'true'
  327 endif
  328 
  329 if get_option('dri2') == 'auto'
  330     build_dri2 = dri2proto_dep.found() and libdrm_dep.found()
  331 else
  332     build_dri2 = get_option('dri2') == 'true'
  333 endif
  334 
  335 if get_option('dri3') == 'auto'
  336     build_dri3 = dri3proto_dep.found() and xshmfence_dep.found() and libdrm_dep.found()
  337 else
  338     build_dri3 = get_option('dri3') == 'true'
  339     if build_dri3
  340        if not xshmfence_dep.found()
  341            error('DRI3 requested, but xshmfence not found')
  342        endif
  343     endif
  344 endif
  345 
  346 libdrm_required = build_dri1 or build_dri2 or build_dri3
  347 if not libdrm_dep.found() and libdrm_required
  348     error('DRI requested, but LIBDRM not found')
  349 endif
  350 
  351 build_modesetting = libdrm_dep.found()
  352 
  353 build_vbe = false
  354 if get_option('vbe') == 'auto'
  355     if (host_machine.system() != 'darwin' and
  356         host_machine.system() != 'windows' and
  357         host_machine.system() != 'cygwin')
  358         build_vbe = true
  359     endif
  360 else
  361     build_vbe = get_option('vbe') == 'true'
  362 endif
  363 
  364 build_vgahw = false
  365 if get_option('vgahw') == 'auto'
  366     if (host_machine.system() != 'darwin' and
  367         host_machine.system() != 'windows' and
  368         host_machine.system() != 'cygwin')
  369         build_vgahw = true
  370     endif
  371 else
  372     build_vgahw = get_option('vgahw') == 'true'
  373 endif
  374 
  375 build_dpms = get_option('dpms')
  376 if build_xquartz
  377     build_dpms = false
  378 endif
  379 
  380 build_xf86bigfont = get_option('xf86bigfont')
  381 build_screensaver = get_option('screensaver')
  382 build_res = get_option('xres')
  383 if build_res
  384     build_hashtable = true
  385 endif
  386 
  387 build_xace = get_option('xace')
  388 build_xinerama = get_option('xinerama')
  389 
  390 build_xsecurity = get_option('xcsecurity')
  391 if build_xsecurity
  392     if not build_xace
  393         error('cannot build Security extension without X-ACE')
  394     endif
  395 endif
  396 
  397 build_xv = get_option('xv')
  398 build_xvmc = get_option('xvmc')
  399 if not build_xv
  400     build_xvmc = false
  401 endif
  402 
  403 build_dga = false
  404 if get_option('dga') == 'auto'
  405     xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1', required: false)
  406     if xf86dgaproto_dep.found()
  407         build_dga = true
  408     endif
  409 elif get_option('dga') == 'true'
  410     xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1', required: true)
  411     build_dga = true
  412 endif
  413 
  414 build_apm = false
  415 if (get_option('linux_apm') == true and
  416    host_machine.system() == 'linux')
  417     if cc.has_header('linux/apm_bios.h')
  418         build_apm = true
  419     endif
  420 endif
  421 
  422 build_acpi = false
  423 if (get_option('linux_acpi') == true and
  424    host_machine.system() == 'linux')
  425     if (host_machine.cpu() == 'x86' or
  426        host_machine.cpu() == 'x86_64' or
  427        host_machine.cpu() == 'ia64')
  428         build_acpi = true
  429     endif
  430 endif
  431 
  432 build_mitshm = false
  433 if get_option('mitshm') == 'auto'
  434     build_mitshm = cc.has_header('sys/shm.h')
  435 elif get_option('mitshm') == 'true'
  436     build_mitshm = true
  437 endif
  438 
  439 # XXX: Allow configuration of these.
  440 build_xselinux = false
  441 build_xf86vidmode = xf86vidmodeproto_dep.found()
  442 
  443 m_dep = cc.find_library('m', required : false)
  444 dl_dep = cc.find_library('dl', required : false)
  445 
  446 common_dep = [
  447     xproto_dep,
  448     randrproto_dep,
  449     renderproto_dep,
  450     xextproto_dep,
  451     inputproto_dep,
  452     kbproto_dep,
  453     fontsproto_dep,
  454     fixesproto_dep,
  455     damageproto_dep,
  456     xcmiscproto_dep,
  457     bigreqsproto_dep,
  458     xtrans_dep,
  459 
  460     videoproto_dep,
  461     compositeproto_dep,
  462     recordproto_dep,
  463     scrnsaverproto_dep,
  464     resourceproto_dep,
  465     xf86driproto_dep,
  466     dri2proto_dep,
  467     dri3proto_dep,
  468     xineramaproto_dep,
  469     xf86bigfontproto_dep,
  470     xf86dgaproto_dep,
  471     xf86vidmodeproto_dep,
  472     windowswmproto_dep,
  473     applewmproto_dep,
  474 
  475     pixman_dep,
  476     libbsd_dep,
  477     xkbfile_dep,
  478     xfont2_dep,
  479     xdmcp_dep,
  480 ]
  481 
  482 inc = include_directories(
  483     'Xext',
  484     'Xi',
  485     'composite',
  486     'damageext',
  487     'exa',
  488     'fb',
  489     'glamor',
  490     'mi',
  491     'miext/damage',
  492     'miext/shadow',
  493     'miext/sync',
  494     'dbe',
  495     'dri3',
  496     'include',
  497     'present',
  498     'randr',
  499     'render',
  500     'xfixes',
  501 )
  502 
  503 glx_inc = include_directories('glx')
  504 
  505 top_srcdir_inc = include_directories('.')
  506 
  507 serverconfigdir = join_paths(get_option('libdir'), 'xorg')
  508 
  509 manpage_config = configuration_data()
  510 manpage_config.set('vendorversion', '"xorg-server @0@" "X Version 11"'.format(meson.project_version()))
  511 manpage_config.set('xorgversion', '"xorg-server @0@" "X Version 11"'.format(meson.project_version()))
  512 manpage_config.set('xservername', 'Xorg')
  513 manpage_config.set('xconfigfile', 'xorg.conf')
  514 manpage_config.set('projectroot', get_option('prefix'))
  515 manpage_config.set('apploaddir', '$(appdefaultdir)')
  516 manpage_config.set('appmansuffix', '1')
  517 manpage_config.set('drivermansuffix', '4')
  518 manpage_config.set('adminmansuffix', '8')
  519 manpage_config.set('libmansuffix', '3')
  520 manpage_config.set('miscmansuffix', '7')
  521 manpage_config.set('filemansuffix', '5')
  522 manpage_config.set('logdir', log_dir)
  523 manpage_config.set('datadir', join_paths(get_option('prefix'), get_option('datadir')))
  524 manpage_config.set('mandir', join_paths(get_option('prefix'), get_option('mandir')))
  525 manpage_config.set('sysconfdir', join_paths(get_option('prefix'), get_option('sysconfdir')))
  526 manpage_config.set('xconfigdir', 'xorg.conf.d')
  527 manpage_config.set('xkbdir', xkb_dir)
  528 manpage_config.set('XKB_DFLT_RULES', get_option('xkb_default_rules'))
  529 manpage_config.set('XKB_DFLT_MODEL', get_option('xkb_default_model'))
  530 manpage_config.set('XKB_DFLT_LAYOUT', get_option('xkb_default_layout'))
  531 manpage_config.set('XKB_DFLT_VARIANT', get_option('xkb_default_variant'))
  532 manpage_config.set('XKB_DFLT_OPTIONS', get_option('xkb_default_options'))
  533 manpage_config.set('bundle_id_prefix', '...')
  534 manpage_config.set('modulepath', module_dir)
  535 # wtf doesn't this work
  536 # manpage_config.set('suid_wrapper_dir', join_paths(get_option('prefix'), libexecdir))
  537 manpage_config.set('suid_wrapper_dir', join_paths(get_option('prefix'), 'libexec'))
  538 manpage_config.set('default_font_path', default_font_path)
  539 
  540 # Include must come first, as it sets up dix-config.h
  541 subdir('include')
  542 
  543 # X server core
  544 subdir('config')
  545 subdir('dix')
  546 subdir('dri3')
  547 subdir('glx')
  548 subdir('fb')
  549 subdir('mi')
  550 subdir('os')
  551 # X extensions
  552 subdir('composite')
  553 subdir('damageext')
  554 subdir('dbe')
  555 subdir('miext/damage')
  556 subdir('miext/shadow')
  557 subdir('miext/sync')
  558 subdir('present')
  559 if build_xwin or build_xquartz
  560     subdir('pseudoramiX')
  561 endif
  562 subdir('randr')
  563 subdir('record')
  564 subdir('render')
  565 subdir('xfixes')
  566 subdir('xkb')
  567 subdir('Xext')
  568 subdir('Xi')
  569 # other
  570 if build_glamor
  571     subdir('glamor')
  572 endif
  573 if build_xorg or get_option('xephyr')
  574     subdir('exa')
  575 endif
  576 
  577 # Common static libraries of all X servers
  578 libxserver = [
  579     libxserver_mi,
  580     libxserver_dix,
  581 
  582     libxserver_composite,
  583     libxserver_damageext,
  584     libxserver_dbe,
  585     libxserver_randr,
  586     libxserver_miext_damage,
  587     libxserver_render,
  588     libxserver_present,
  589     libxserver_xext,
  590     libxserver_miext_sync,
  591     libxserver_xfixes,
  592     libxserver_xi,
  593     libxserver_xkb,
  594     libxserver_record,
  595 
  596     libxserver_os,
  597 ]
  598 
  599 libxserver += libxserver_dri3
  600 
  601 subdir('hw')
  602 subdir('test')
  603 
  604 install_man(configure_file(
  605     input: 'man/Xserver.man',
  606     output: 'Xserver.1',
  607     configuration: manpage_config,
  608 ))
  609 
  610 if build_xorg
  611     sdkconfig = configuration_data()
  612     awk = find_program('awk')
  613 
  614     sdkconfig.set('prefix', get_option('prefix'))
  615     sdkconfig.set('exec_prefix', '${prefix}')
  616     sdkconfig.set('libdir', join_paths('${exec_prefix}', get_option('libdir')))
  617     sdkconfig.set('includedir', join_paths('${prefix}', get_option('includedir')))
  618     sdkconfig.set('datarootdir', join_paths('${prefix}', get_option('datadir')))
  619     sdkconfig.set('moduledir', join_paths('${exec_prefix}', module_dir))
  620     sdkconfig.set('sdkdir', join_paths('${prefix}', get_option('includedir'), 'xorg'))
  621     sdkconfig.set('sysconfigdir', join_paths('${datarootdir}', 'X11/xorg.conf.d'))
  622 
  623     sdkconfig.set('abi_ansic',
  624         run_command(awk, '-F', '[(,)]',
  625                     '/^#define ABI_ANSIC.*SET/ { printf "%d.%d", $2, $3 }',
  626                     files('hw/xfree86/common/xf86Module.h')
  627         ).stdout()
  628     )
  629     sdkconfig.set('abi_videodrv',
  630         run_command(awk, '-F', '[(,)]',
  631                     '/^#define ABI_VIDEODRV.*SET/ { printf "%d.%d", $2, $3 }',
  632                     files('hw/xfree86/common/xf86Module.h')
  633         ).stdout()
  634     )
  635     sdkconfig.set('abi_xinput',
  636         run_command(awk, '-F', '[(,)]',
  637                     '/^#define ABI_XINPUT.*SET/ { printf "%d.%d", $2, $3 }',
  638                     files('hw/xfree86/common/xf86Module.h')
  639         ).stdout()
  640     )
  641     sdkconfig.set('abi_extension',
  642         run_command(awk, '-F', '[(,)]',
  643                     '/^#define ABI_EXTENSION.*SET/ { printf "%d.%d", $2, $3 }',
  644                     files('hw/xfree86/common/xf86Module.h')
  645         ).stdout()
  646     )
  647 
  648     sdk_required_modules = [
  649       'pixman-1 >= 0.27.2',
  650     ]
  651 
  652     # XXX this isn't trying very hard, but hard enough.
  653     sdkconfig.set('PACKAGE_VERSION', meson.project_version())
  654     sdkconfig.set('SDK_REQUIRED_MODULES', ' '.join(sdk_required_modules))
  655     sdkconfig.set('symbol_visibility', '-fvisibility=hidden')
  656     sdkconfig.set('XORG_DRIVER_LIBS', '')
  657 
  658     configure_file(
  659         input: 'xorg-server.pc.in',
  660         output: 'xorg-server.pc',
  661         configuration: sdkconfig,
  662         install_dir: join_paths(get_option('prefix'),
  663                                 get_option('libdir'),
  664                                 'pkgconfig'),
  665     )
  666 endif
  667 
  668 install_data('xorg-server.m4',
  669              install_dir: join_paths(get_option('datadir'), 'aclocal'))