xserver

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

meson.build (2544B)


      1 srcs_os = [
      2     'WaitFor.c',
      3     'access.c',
      4     'auth.c',
      5     'backtrace.c',
      6     'client.c',
      7     'connection.c',
      8     'inputthread.c',
      9     'io.c',
     10     'mitauth.c',
     11     'oscolor.c',
     12     'osinit.c',
     13     'ospoll.c',
     14     'utils.c',
     15     'xdmauth.c',
     16     'xsha1.c',
     17     'xstrans.c',
     18     'xprintf.c',
     19     'log.c',
     20 ]
     21 
     22 # Wrapper code for missing C library functions. Note that conf_data contains either '1' or false.
     23 srcs_libc = []
     24 if conf_data.get('HAVE_REALLOCARRAY').to_int() == 0
     25     srcs_libc += 'reallocarray.c'
     26 endif
     27 if conf_data.get('HAVE_STRCASECMP').to_int() == 0
     28     srcs_libc += 'strcasecmp.c'
     29 endif
     30 if conf_data.get('HAVE_STRCASESTR').to_int() == 0
     31     srcs_libc += 'strcasestr.c'
     32 endif
     33 if conf_data.get('HAVE_STRLCAT').to_int() == 0
     34     srcs_libc += 'strlcat.c'
     35 endif
     36 if conf_data.get('HAVE_STRLCPY').to_int() == 0
     37     srcs_libc += 'strlcpy.c'
     38 endif
     39 if conf_data.get('HAVE_STRNDUP').to_int() == 0
     40     srcs_libc += 'strndup.c'
     41 endif
     42 if conf_data.get('HAVE_TIMINGSAFE_MEMCMP').to_int() == 0
     43     srcs_libc += 'timingsafe_memcmp.c'
     44 endif
     45 if conf_data.get('HAVE_POLL').to_int() == 0
     46     srcs_os += 'xserver_poll.c'
     47 endif
     48 
     49 if conf_data.get('BUSFAULT').to_int() != 0
     50     srcs_os += 'busfault.c'
     51 endif
     52 
     53 if get_option('xdmcp')
     54     srcs_os += 'xdmcp.c'
     55 endif
     56 
     57 rpc_dep = []
     58 if get_option('secure-rpc')
     59     # prefer libtirpc (if available), otherwise ensure RPC functions are
     60     # provided by libc.
     61     rpc_dep = dependency('libtirpc', required: false)
     62     if not (rpc_dep.found() or cc.has_header('rpc/rpc.h'))
     63         error('secure-rpc requested, but neither libtirpc or libc RPC support were found')
     64     endif
     65     # XXX: also check if RPC library provides xdr_opaque_auth, authdes_(sec)create ???
     66     srcs_os += 'rpcauth.c'
     67 endif
     68 
     69 os_dep = []
     70 os_c_args = []
     71 if get_option('xres')
     72     # Only the XRes extension cares about the client ID.
     73     os_c_args += '-DCLIENTIDS'
     74     if host_machine.system() == 'openbsd'
     75         os_dep += cc.find_library('kvm')
     76     endif
     77 endif
     78 
     79 libxlibc = []
     80 if srcs_libc.length() > 0
     81     libxlibc = static_library('libxlibc',
     82         srcs_libc,
     83         include_directories: inc,
     84         dependencies: [
     85             xproto_dep,
     86         ],
     87     )
     88 endif
     89 
     90 if enable_input_thread
     91     os_dep += cc.find_library('pthread')
     92 endif
     93 
     94 libxserver_os = static_library('libxserver_os',
     95     srcs_os,
     96     include_directories: inc,
     97     dependencies: [
     98         dtrace_dep,
     99         common_dep,
    100         dl_dep,
    101         sha1_dep,
    102         rpc_dep,
    103         os_dep,
    104         dependency('xau')
    105     ],
    106     c_args: os_c_args,
    107     link_with: libxlibc,
    108 )