xserver

xserver with xephyr scale patch
git clone https://git.neptards.moe/u3shit/xserver.git
Log | Files | Refs | README | LICENSE

meson.build (20827B)


      1 version_split = meson.project_version().split('.')
      2 major = version_split[0].to_int()
      3 minor = version_split[1].to_int()
      4 patch = version_split[2].to_int()
      5 
      6 # convert to the old-style 1.x.y version scheme used up to 1.20.x for backwards compatibility
      7 release = 1 * 10000000 + major * 100000 + minor * 1000 + patch
      8 
      9 dri_dep = dependency('dri', required: build_glx)
     10 
     11 conf_data = configuration_data()
     12 conf_data.set('_DIX_CONFIG_H_', '1')
     13 
     14 conf_data.set('HAVE_TYPEOF', cc.compiles('''
     15     int foo(int bar) { typeof(bar) baz = 1; return baz; }
     16 ''',
     17     name: 'typeof()') ? '1' : false)
     18 
     19 # For feature macros we're using either false (boolean) or '1', which correspond to the macro being
     20 # not defined at all and defined to 1. This is to match autotools behavior and thus preserve
     21 # backwards  compatibility with all the existing code that uses #ifdef to check if feature is
     22 # enabled. This ifdef would pass if the macro is defined to 0 which would silently break code
     23 # in various places.
     24 #
     25 # As a complication when we read the configuration from conf_data back we get either string or
     26 # bool. Meson does not like comparing things of different types so we always convert the returned
     27 # value to an integer using to_int().
     28 conf_data.set('MONOTONIC_CLOCK', cc.has_function('clock_gettime') and
     29 cc.compiles('''
     30     #define _POSIX_C_SOURCE 200112L
     31     #include <time.h>
     32     #include <unistd.h>
     33     #ifndef CLOCK_MONOTONIC
     34     #error CLOCK_MONOTONIC not defined
     35     #endif
     36 ''',
     37     name: 'CLOCK_MONOTONIC') ? '1' : false)
     38 
     39 conf_data.set('XSERVER_DTRACE', with_dtrace ? '1' : false)
     40 
     41 if host_machine.endian() == 'little'
     42     conf_data.set('X_BYTE_ORDER', 'X_LITTLE_ENDIAN')
     43 else
     44     conf_data.set('X_BYTE_ORDER', 'X_BIG_ENDIAN')
     45 endif
     46 
     47 glx_align64 = []
     48 if cc.sizeof('unsigned long') == 8
     49    conf_data.set('_XSERVER64', '1')
     50    glx_align64 = '-D__GLX_ALIGN64'
     51 endif
     52 
     53 conf_data.set('_GNU_SOURCE', '1')
     54 
     55 # autoconf checks for /dev/xf86 here, but the test should be based on
     56 # the target, not the build system.  Could we get rid of this and just
     57 # ifdef for openbsd?
     58 conf_data.set('HAS_APERTURE_DRV', host_machine.system() == 'openbsd' ? '1' : false)
     59 
     60 if get_option('input_thread') == 'false'
     61   enable_input_thread = false
     62 else
     63   enable_input_thread = cc.has_header_symbol('pthread.h',
     64 					     'PTHREAD_MUTEX_RECURSIVE')
     65   if not enable_input_thread and get_option('input_thread') == 'true'
     66     error('Input thread enabled and PTHREAD_MUTEX_RECURSIVE not found')
     67   endif
     68   if host_machine.system() == 'windows' and get_option('input_thread') == 'auto'
     69       enable_input_thread = false
     70   endif
     71 endif
     72 conf_data.set('INPUTTHREAD', enable_input_thread ? '1' : false)
     73 
     74 if cc.compiles('''
     75     #define _GNU_SOURCE 1
     76     #include <pthread.h>
     77     void foo(int bar) { pthread_setname_np(pthread_self(), "example"); }
     78 ''',
     79     args: '-Werror-implicit-function-declaration',
     80     name: 'pthread_setname_np(tid, name)')
     81     conf_data.set('HAVE_PTHREAD_SETNAME_NP_WITH_TID', 1)
     82 elif cc.compiles('''
     83     #define _GNU_SOURCE 1
     84     #include <pthread.h>
     85     void foo(int bar) { pthread_setname_np("example"); }
     86 ''',
     87     args: '-Werror-implicit-function-declaration',
     88     name: 'pthread_setname_np(name)')
     89     conf_data.set('HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID', 1)
     90 endif
     91 
     92 conf_data.set('HAVE_LIBBSD', libbsd_dep.found() ? '1' : false)
     93 # Note: this symbol is used by libXtrans.
     94 conf_data.set('HAVE_SYSTEMD_DAEMON', libsystemd_daemon_dep.found() ? '1' : false)
     95 conf_data.set('CONFIG_UDEV', build_udev ? '1' : false)
     96 conf_data.set('CONFIG_UDEV_KMS', build_udev_kms ? '1' : false)
     97 conf_data.set('HAVE_DBUS', build_dbus ? '1' : false)
     98 conf_data.set('CONFIG_HAL', build_hal ? '1' : false)
     99 conf_data.set('SYSTEMD_LOGIND', build_systemd_logind ? '1' : false)
    100 conf_data.set('NEED_DBUS', build_systemd_logind or build_hal ? '1' : false)
    101 conf_data.set('CONFIG_WSCONS', host_machine.system() == 'openbsd' ? '1' : false)
    102 
    103 conf_data.set('HAVE_XSHMFENCE', xshmfence_dep.found() ? '1' : false)
    104 conf_data.set('WITH_LIBDRM', libdrm_required ? '1' : false)
    105 conf_data.set('GLAMOR_HAS_EGL_QUERY_DMABUF',
    106               epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.4.4') ? '1' : false)
    107 conf_data.set('GLAMOR_HAS_EGL_QUERY_DRIVER',
    108               epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.5.4') ? '1' : false)
    109 conf_data.set('GLXEXT', build_glx ? '1' : false)
    110 conf_data.set('GLAMOR', build_glamor ? '1' : false)
    111 conf_data.set('GLAMOR_HAS_GBM', gbm_dep.found() ? '1' : false)
    112 conf_data.set('GLAMOR_HAS_GBM_LINEAR',
    113               build_glamor and gbm_dep.found() and gbm_dep.version().version_compare('>= 10.6') ? '1' : false)
    114 conf_data.set('GBM_BO_WITH_MODIFIERS',
    115               build_glamor and gbm_dep.found() and gbm_dep.version().version_compare('>= 17.1') ? '1' : false)
    116 
    117 conf_data.set_quoted('SERVER_MISC_CONFIG_PATH', serverconfigdir)
    118 conf_data.set_quoted('PROJECTROOT', get_option('prefix'))
    119 conf_data.set_quoted('SYSCONFDIR', join_paths(get_option('prefix'), get_option('sysconfdir')))
    120 conf_data.set_quoted('SUID_WRAPPER_DIR', join_paths(get_option('prefix'), get_option('libexecdir')))
    121 conf_data.set_quoted('COMPILEDDEFAULTFONTPATH', default_font_path)
    122 
    123 conf_data.set('XORG_VERSION_CURRENT', release)
    124 
    125 conf_data.set('HASXDMAUTH', has_xdm_auth ? '1' : false)
    126 conf_data.set('SECURE_RPC', get_option('secure-rpc') ? '1' : false)
    127 
    128 conf_data.set('HAVE_DLFCN_H', cc.has_header('dlfcn.h') ? '1' : false)
    129 conf_data.set('HAVE_EXECINFO_H', cc.has_header('execinfo.h') ? '1' : false)
    130 conf_data.set('HAVE_FCNTL_H', cc.has_header('fcntl.h') ? '1' : false)
    131 conf_data.set('HAVE_FNMATCH_H', cc.has_header('fnmatch.h') ? '1' : false)
    132 conf_data.set('HAVE_LINUX_AGPGART_H', cc.has_header('linux/agpgart.h') ? '1' : false)
    133 conf_data.set('HAVE_STDLIB_H', cc.has_header('stdlib.h') ? '1' : false)
    134 conf_data.set('HAVE_STRING_H', cc.has_header('string.h') ? '1' : false)
    135 conf_data.set('HAVE_STRINGS_H', cc.has_header('strings.h') ? '1' : false)
    136 conf_data.set('HAVE_SYS_AGPGART_H', cc.has_header('sys/agpgart.h') ? '1' : false)
    137 conf_data.set('HAVE_SYS_AGPIO_H', cc.has_header('sys/agpio.h') ? '1' : false)
    138 conf_data.set('HAVE_SYS_UTSNAME_H', cc.has_header('sys/utsname.h') ? '1' : false)
    139 conf_data.set('HAVE_SYS_SYSMACROS_H', cc.has_header('sys/sysmacros.h') ? '1' : false)
    140 conf_data.set('HAVE_UNISTD_H', cc.has_header('unistd.h') ? '1' : false)
    141 
    142 conf_data.set('HAVE_ARC4RANDOM_BUF', cc.has_function('arc4random_buf', dependencies: libbsd_dep) ? '1' : false)
    143 conf_data.set('HAVE_BACKTRACE', cc.has_function('backtrace') ? '1' : false)
    144 conf_data.set('HAVE_CBRT', cc.has_function('cbrt') ? '1' : false)
    145 conf_data.set('HAVE_EPOLL_CREATE1', cc.has_function('epoll_create1') ? '1' : false)
    146 conf_data.set('HAVE_GETUID', cc.has_function('getuid') ? '1' : false)
    147 conf_data.set('HAVE_GETEUID', cc.has_function('geteuid') ? '1' : false)
    148 conf_data.set('HAVE_ISASTREAM', cc.has_function('isastream') ? '1' : false)
    149 conf_data.set('HAVE_ISSETUGID', cc.has_function('issetugid') ? '1' : false)
    150 conf_data.set('HAVE_GETIFADDRS', cc.has_function('getifaddrs') ? '1' : false)
    151 conf_data.set('HAVE_GETPEEREID', cc.has_function('getpeereid') ? '1' : false)
    152 conf_data.set('HAVE_GETPEERUCRED', cc.has_function('getpeerucred') ? '1' : false)
    153 conf_data.set('HAVE_GETPROGNAME', cc.has_function('getprogname') ? '1' : false)
    154 conf_data.set('HAVE_GETZONEID', cc.has_function('getzoneid') ? '1' : false)
    155 conf_data.set('HAVE_MEMFD_CREATE', cc.has_function('memfd_create') ? '1' : false)
    156 conf_data.set('HAVE_MKOSTEMP', cc.has_function('mkostemp') ? '1' : false)
    157 conf_data.set('HAVE_MMAP', cc.has_function('mmap') ? '1' : false)
    158 conf_data.set('HAVE_POLL', cc.has_function('poll') ? '1' : false)
    159 conf_data.set('HAVE_POLLSET_CREATE', cc.has_function('pollset_create') ? '1' : false)
    160 conf_data.set('HAVE_POSIX_FALLOCATE', cc.has_function('posix_fallocate') ? '1' : false)
    161 conf_data.set('HAVE_PORT_CREATE', cc.has_function('port_create') ? '1' : false)
    162 conf_data.set('HAVE_REALLOCARRAY', cc.has_function('reallocarray', dependencies: libbsd_dep) ? '1' : false)
    163 conf_data.set('HAVE_SETEUID', cc.has_function('seteuid') ? '1' : false)
    164 conf_data.set('HAVE_SETITIMER', cc.has_function('setitimer') ? '1' : false)
    165 conf_data.set('HAVE_SHMCTL64', cc.has_function('shmctl64') ? '1' : false)
    166 conf_data.set('HAVE_SIGACTION', cc.has_function('sigaction') ? '1' : false)
    167 conf_data.set('HAVE_SIGPROCMASK', cc.has_function('sigprocmask') ? '1' : false)
    168 conf_data.set('HAVE_STRCASECMP', cc.has_function('strcasecmp') ? '1' : false)
    169 conf_data.set('HAVE_STRCASESTR', cc.has_function('strcasestr') ? '1' : false)
    170 conf_data.set('HAVE_STRLCAT', cc.has_function('strlcat', dependencies: libbsd_dep) ? '1' : false)
    171 conf_data.set('HAVE_STRLCPY', cc.has_function('strlcpy', dependencies: libbsd_dep) ? '1' : false)
    172 conf_data.set('HAVE_STRNCASECMP', cc.has_function('strncasecmp') ? '1' : false)
    173 conf_data.set('HAVE_STRNDUP', cc.has_function('strndup') and cc.has_header_symbol('string.h', 'strndup') ? '1' : false)
    174 conf_data.set('HAVE_TIMINGSAFE_MEMCMP', cc.has_function('timingsafe_memcmp') ? '1' : false)
    175 conf_data.set('HAVE_VASPRINTF', cc.has_function('vasprintf') ? '1' : false)
    176 conf_data.set('HAVE_VSNPRINTF', cc.has_function('vsnprintf') ? '1' : false)
    177 conf_data.set('HAVE_WALKCONTEXT', cc.has_function('walkcontext') ? '1' : false)
    178 
    179 conf_data.set('BUSFAULT', conf_data.get('HAVE_SIGACTION'))
    180 
    181 # Don't let X dependencies typedef 'pointer'
    182 conf_data.set('_XTYPEDEF_POINTER', '1')
    183 conf_data.set('_XITYPEDEF_POINTER', '1')
    184 
    185 conf_data.set('LISTEN_TCP', get_option('listen_tcp'))
    186 conf_data.set('LISTEN_UNIX', get_option('listen_unix'))
    187 conf_data.set('LISTEN_LOCAL', get_option('listen_local'))
    188 
    189 if cc.has_header_symbol('sys/socket.h', 'SCM_RIGHTS')
    190   conf_data.set('XTRANS_SEND_FDS', '1')
    191 endif
    192 
    193 if conf_data.get('HAVE_GETPEEREID').to_int() == 0 and conf_data.get('HAVE_GETPEERUCRED').to_int() == 0
    194     if not cc.has_header_symbol('sys/socket.h', 'SO_PEERCRED')
    195         conf_data.set('NO_LOCAL_CLIENT_CRED', 1)
    196     endif
    197 endif
    198 
    199 conf_data.set('TCPCONN', '1')
    200 conf_data.set('UNIXCONN', host_machine.system() != 'windows' ? '1' : false)
    201 conf_data.set('IPv6', build_ipv6 ? '1' : false)
    202 
    203 conf_data.set('BIGREQS', '1')
    204 conf_data.set('COMPOSITE', '1')
    205 conf_data.set('DAMAGE', '1')
    206 conf_data.set('DBE', '1')
    207 conf_data.set('DGA', build_dga ? '1' : false)
    208 conf_data.set('DPMSExtension', build_dpms ? '1' : false)
    209 conf_data.set('DRI2', build_dri2 ? '1' : false)
    210 conf_data.set('DRI3', build_dri3 ? '1' : false)
    211 if build_glx
    212     conf_data.set_quoted('DRI_DRIVER_PATH', dri_dep.get_pkgconfig_variable('dridriverdir'))
    213 endif
    214 conf_data.set('HAS_SHM', build_mitshm ? '1' : false)
    215 conf_data.set('MITSHM', build_mitshm ? '1' : false)
    216 conf_data.set('PANORAMIX', build_xinerama ? '1' : false)
    217 conf_data.set('PRESENT', '1')
    218 conf_data.set('RANDR', '1')
    219 conf_data.set('RES', build_res ? '1' : false)
    220 conf_data.set('RENDER', '1')
    221 conf_data.set('SCREENSAVER', build_screensaver ? '1' : false)
    222 conf_data.set('SHAPE', '1')
    223 conf_data.set('XACE', build_xace ? '1' : false)
    224 conf_data.set('XCMISC', '1')
    225 conf_data.set('XCSECURITY', build_xsecurity ? '1' : false)
    226 conf_data.set('XDMCP', xdmcp_dep.found() ? '1' : false)
    227 conf_data.set('XF86BIGFONT', build_xf86bigfont ? '1' : false)
    228 conf_data.set('XF86DRI', build_dri1 ? '1' : false)
    229 conf_data.set('XF86VIDMODE', 1)
    230 conf_data.set('XFIXES', '1')
    231 conf_data.set('XFreeXDGA', build_dga ? '1' : false)
    232 conf_data.set('XINERAMA', build_xinerama ? '1' : false)
    233 conf_data.set('XINPUT', '1')
    234 conf_data.set('XRECORD', '1')
    235 conf_data.set('XSELINUX', build_xselinux ? '1' : false)
    236 conf_data.set('XSYNC', '1')
    237 conf_data.set('XTEST', '1')
    238 conf_data.set('XV', build_xv ? '1' : false)
    239 conf_data.set('XvExtension', build_xv ? '1' : false)
    240 conf_data.set('XvMCExtension', build_xvmc ? '1' : false)
    241 
    242 conf_data.set('HAVE_SHA1_IN_' + sha1.to_upper(), '1', description: 'Use @0@ SHA1 functions'.format(sha1))
    243 conf_data.set('HAVE_LIBUNWIND', get_option('libunwind'))
    244 
    245 conf_data.set('HAVE_APM', (build_apm or build_acpi) ? '1' : false)
    246 conf_data.set('HAVE_ACPI', build_acpi ? '1' : false)
    247 
    248 conf_data.set('DDXOSVERRORF', build_xwin ? '1' : false)
    249 conf_data.set('DDXBEFORERESET', build_xwin ? '1' : false)
    250 enable_debugging = get_option('buildtype') == 'debug'
    251 conf_data.set('DEBUG', enable_debugging ? '1' : false)
    252 
    253 conf_data.set_quoted('XVENDORNAME', get_option('vendor_name'))
    254 conf_data.set_quoted('XVENDORNAMESHORT', get_option('vendor_name_short'))
    255 conf_data.set_quoted('__VENDORDWEBSUPPORT__', get_option('vendor_web'))
    256 conf_data.set_quoted('BUILDERADDR', get_option('builder_addr'))
    257 conf_data.set_quoted('BUILDERSTRING', get_option('builder_string'))
    258 
    259 if build_rootless
    260     conf_data.set('ROOTLESS', build_rootless ? '1' : false)
    261     conf_data.set('ROOTLESS_WORKAROUND', 1)
    262     conf_data.set('ROOTLESS_SAFEALPHA', 1)
    263 endif
    264 
    265 #
    266 # for xorg-server.h only
    267 #
    268 defines_svr4 = '''#if !defined(SVR4) && !defined(__svr4__) && !defined(__SVR4)
    269 #error "I am not SVR4"
    270 #endif
    271 '''
    272 
    273 # BSD specifics
    274 supports_pccons = false
    275 supports_pcvt = false
    276 supports_syscons = false
    277 supports_wscons = false
    278 csrg_based = false
    279 
    280 if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonfly'
    281   supports_pccons = true
    282   supports_pcvt = true
    283   supports_syscons = true
    284   csrg_based = true
    285 endif
    286 
    287 if host_machine.system() == 'kfreebsd'
    288   supports_pccons = true
    289   supports_pcvt = true
    290   supports_syscons = true
    291 endif
    292 
    293 if host_machine.system() == 'netbsd'
    294   supports_pccons = true
    295   supports_pcvt = true
    296   supports_wscons = true
    297   csrg_based = true
    298 endif
    299 
    300 if host_machine.system() == 'openbsd'
    301   supports_pcvt = true
    302   supports_wscons = true
    303   csrg_based = true
    304 endif
    305 
    306 if host_machine.system() == 'darwin'
    307   csrg_based = true
    308 endif
    309 
    310 conf_data.set('SVR4', cc.compiles(defines_svr4) ? '1' : false)
    311 conf_data.set_quoted('XKB_DFLT_RULES', get_option('xkb_default_rules'))
    312 conf_data.set('XORGSERVER', build_xorg ? '1' : false)
    313 conf_data.set_quoted('XCONFIGFILE', 'xorg.conf')
    314 conf_data.set_quoted('__XSERVERNAME__', 'Xorg')
    315 conf_data.set('WITH_VGAHW', build_vgahw ? '1' : false)
    316 conf_data.set('CSRG_BASED', csrg_based ? '1' : false)
    317 conf_data.set('PCCONS_SUPPORT', supports_pccons ? '1' : false)
    318 conf_data.set('PCVT_SUPPORT', supports_pcvt ? '1' : false)
    319 conf_data.set('SYSCONS_SUPPORT', supports_syscons ? '1' : false)
    320 conf_data.set('WSCONS_SUPPORT', supports_wscons ? '1' : false)
    321 conf_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess') ? '1' : false)
    322 conf_data.set('XSERVER_PLATFORM_BUS', build_udev_kms ? '1' : false)
    323 
    324 configure_file(output : 'dix-config.h',
    325                configuration : conf_data)
    326 
    327 configure_file(output : 'xorg-server.h',
    328                input : 'xorg-server.h.meson.in',
    329                configuration : conf_data,
    330                install: build_xorg,
    331                install_dir: xorgsdkdir)
    332 
    333 version_data = configuration_data()
    334 version_data.set('VENDOR_RELEASE', '@0@'.format(release))
    335 version_data.set_quoted('VENDOR_NAME', get_option('vendor_name'))
    336 version_data.set_quoted('VENDOR_NAME_SHORT', get_option('vendor_name_short'))
    337 version_data.set_quoted('VENDOR_WEB', get_option('vendor_web'))
    338 version_data.set_quoted('VENDOR_MAN_VERSION', 'Version @0@.@1@.@2@'.format(major, minor, patch))
    339 configure_file(output : 'version-config.h',
    340                configuration : version_data)
    341 
    342 xkb_data = configuration_data()
    343 
    344 xkb_data.set_quoted('XKB_BIN_DIRECTORY', xkb_bin_dir)
    345 xkb_data.set_quoted('XKB_BASE_DIRECTORY', xkb_dir)
    346 xkb_data.set_quoted('XKB_DFLT_RULES', get_option('xkb_default_rules'))
    347 xkb_data.set_quoted('XKB_DFLT_MODEL', get_option('xkb_default_model'))
    348 xkb_data.set_quoted('XKB_DFLT_LAYOUT', get_option('xkb_default_layout'))
    349 xkb_data.set_quoted('XKB_DFLT_VARIANT', get_option('xkb_default_variant'))
    350 xkb_data.set_quoted('XKB_DFLT_OPTIONS', get_option('xkb_default_options'))
    351 xkb_data.set_quoted('XKM_OUTPUT_DIR', xkb_output_dir + '/')
    352 
    353 configure_file(output : 'xkb-config.h',
    354                configuration : xkb_data)
    355 
    356 xorg_data = configuration_data()
    357 
    358 xorg_data.set_quoted('XORG_BIN_DIRECTORY', get_option('bindir'))
    359 xorg_data.set('XORG_VERSION_CURRENT', release)
    360 xorg_data.set_quoted('XF86CONFIGFILE', 'xorg.conf')
    361 xorg_data.set_quoted('XCONFIGFILE', 'xorg.conf')
    362 xorg_data.set_quoted('XCONFIGDIR', 'xorg.conf.d')
    363 xorg_data.set_quoted('DEFAULT_XDG_DATA_HOME', '.local/share')
    364 xorg_data.set_quoted('DEFAULT_XDG_DATA_HOME_LOGDIR', 'xorg')
    365 xorg_data.set_quoted('DEFAULT_LOGDIR', log_dir)
    366 xorg_data.set_quoted('DEFAULT_LOGPREFIX', 'Xorg.')
    367 xorg_data.set_quoted('DEFAULT_MODULE_PATH', join_paths(get_option('prefix'), module_dir))
    368 xorg_data.set_quoted('DEFAULT_LIBRARY_PATH', join_paths(get_option('prefix'), get_option('libdir')))
    369 xorg_data.set_quoted('__XSERVERNAME__', 'Xorg')
    370 xorg_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess') ? '1' : false)
    371 xorg_data.set_quoted('PCI_TXT_IDS_PATH', '')
    372 xorg_data.set('XSERVER_PLATFORM_BUS', build_udev_kms ? '1' : false)
    373 xorg_data.set('WSCONS_SUPPORT',
    374               host_machine.system() == 'netbsd' or host_machine.system() == 'openbsd' ? '1' : false)
    375 xorg_data.set('HAVE_STROPTS_H', cc.has_header('stropts.h') ? '1' : false)
    376 xorg_data.set('HAVE_SYS_KD_H', cc.has_header('sys/kd.h') ? '1' : false)
    377 xorg_data.set('HAVE_SYS_VT_H', cc.has_header('sys/vt.h') ? '1' : false)
    378 
    379 if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonfly'
    380     if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
    381         xorg_data.set('USE_DEV_IO', '1')
    382     endif
    383 elif host_machine.system() == 'netbsd'
    384     if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
    385         xorg_data.set('USE_I386_IOPL', '1')
    386     endif
    387 elif host_machine.system() == 'openbsd'
    388     if host_machine.cpu_family() == 'x86'
    389         xorg_data.set('USE_I386_IOPL', '1')
    390     endif
    391     if host_machine.cpu_family() == 'x86_64'
    392         xorg_data.set('USE_AMD64_IOPL', '1')
    393     endif
    394 endif
    395 
    396 configure_file(output : 'xorg-config.h',
    397                input : 'xorg-config.h.meson.in',
    398                configuration : xorg_data)
    399 
    400 xwin_data = configuration_data()
    401 xwin_data.set_quoted('DEFAULT_LOGDIR', log_dir)
    402 xwin_data.set('HAS_WINSOCK', host_machine.system() == 'windows' ? '1' : false,
    403               description: 'Use Windows sockets')
    404 xwin_data.set('HAS_DEVWINDOWS', host_machine.system() == 'cygwin' ? '1' : false,
    405               description: 'Has /dev/windows for signaling new win32 messages')
    406 xwin_data.set('RELOCATE_PROJECTROOT', host_machine.system() == 'windows' ? '1' : false,
    407               description: 'Make paths relative to the xserver installation location')
    408 # XXX: these three are all the same as DEBUG so we should just change to that
    409 xwin_data.set10('CYGDEBUG', enable_debugging)
    410 xwin_data.set10('CYGWINDOWING_DEBUG',enable_debugging)
    411 xwin_data.set10('CYGMULTIWINDOW_DEBUG', enable_debugging)
    412 
    413 configure_file(output : 'xwin-config.h',
    414                input : 'xwin-config.h.meson.in',
    415                configuration : xwin_data)
    416 
    417 dtrace_hdr = []
    418 dtrace_tmpl = files('Xserver.d')
    419 if with_dtrace
    420     dtrace_header = generator(dtrace,
    421         output: '@BASENAME@-dtrace.h',
    422         arguments: ['-h', '-s', '@INPUT@', '-o', '@OUTPUT@']
    423     )
    424 
    425     dtrace_hdr += dtrace_header.process(dtrace_tmpl)
    426 endif
    427 
    428 if build_xorg
    429     install_data(
    430         [
    431             'XIstubs.h',
    432             'Xprintf.h',
    433             'callback.h',
    434             'client.h',
    435             'closestr.h',
    436             'closure.h',
    437             'colormap.h',
    438             'colormapst.h',
    439             'hotplug.h',
    440             'cursor.h',
    441             'cursorstr.h',
    442             'dix.h',
    443             'dixaccess.h',
    444             'dixevents.h',
    445             'dixfont.h',
    446             'dixfontstr.h',
    447             'dixgrabs.h',
    448             'dixstruct.h',
    449             'events.h',
    450             'exevents.h',
    451             'extension.h',
    452             'extinit.h',
    453             'extnsionst.h',
    454             'fourcc.h',
    455             'gc.h',
    456             'gcstruct.h',
    457             'globals.h',
    458             'glx_extinit.h',
    459             'glxvndabi.h',
    460             'input.h',
    461             'inputstr.h',
    462             'list.h',
    463             'misc.h',
    464             'miscstruct.h',
    465             'opaque.h',
    466             'nonsdk_extinit.h',
    467             'optionstr.h',
    468             'os.h',
    469             'pixmap.h',
    470             'pixmapstr.h',
    471             'privates.h',
    472             'property.h',
    473             'propertyst.h',
    474             'ptrveloc.h',
    475             'region.h',
    476             'regionstr.h',
    477             'registry.h',
    478             'resource.h',
    479             'rgb.h',
    480             'screenint.h',
    481             'scrnintstr.h',
    482             'selection.h',
    483             'servermd.h',
    484             'validate.h',
    485             'displaymode.h',
    486             'window.h',
    487             'windowstr.h',
    488             'xkbfile.h',
    489             'xkbsrv.h',
    490             'xkbstr.h',
    491             'xkbrules.h',
    492             'Xprintf.h',
    493             'xserver_poll.h',
    494             'xserver-properties.h',
    495         ],
    496         install_dir: xorgsdkdir,
    497     )
    498 endif