diff options
author | Thierry Reding <treding@nvidia.com> | 2018-03-28 14:04:36 +0200 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2018-03-28 09:54:24 -0400 |
commit | d905e3330fd4f9b15a0277b22d608705787cb8bc (patch) | |
tree | 332382cc7534c9cb7a22d74ad6ab5e22e30ad512 | |
parent | 0babe78ed5afec8a06a517346f39b5ebd003773c (diff) |
meson: Fill in missing data for xorg-server.h
Provide more values for the definitions in xorg-server.h for Meson
builds. The only missing defines left after this are _BSD_SOURCE,
_POSIX_SOURCE and _XOPEN_SOURCE, but Meson seems to already define
these via the command-line if necessary.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | include/meson.build | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/include/meson.build b/include/meson.build index 0e8465e82..fdec1f306 100644 --- a/include/meson.build +++ b/include/meson.build @@ -213,6 +213,61 @@ conf_data.set_quoted('OSVENDOR', get_option('os_vendor')) conf_data.set_quoted('BUILDERADDR', get_option('builder_addr')) conf_data.set_quoted('BUILDERSTRING', get_option('builder_string')) +# +# for xorg-server.h only +# +defines_svr4 = '''#if !defined(SVR4) && !defined(__svr4__) && !defined(__SVR4) +#error "I am not SVR4" +#endif +''' + +# BSD specifics +supports_pccons = false +supports_pcvt = false +supports_syscons = false +supports_wscons = false +csrg_based = false + +if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonflybsd' + supports_pccons = true + supports_pcvt = true + supports_syscons = true + csrg_based = true +endif + +if host_machine.system() == 'kfreebsd' + supports_pccons = true + supports_pcvt = true + supports_syscons = true +endif + +if host_machine.system() == 'netbsd' + supports_pccons = true + supports_pcvt = true + supports_wscons = true + csrg_based = true +endif + +if host_machine.system() == 'openbsd' + supports_pcvt = true + supports_wscons = true + csrg_based = true +endif + +conf_data.set('SVR4', cc.compiles(defines_svr4)) +conf_data.set_quoted('XKB_DFLT_RULES', get_option('xkb_default_rules')) +conf_data.set('XORGSERVER', build_xorg) +conf_data.set_quoted('XCONFIGFILE', join_paths(get_option('sysconfdir'), 'xorg.conf')) +conf_data.set_quoted('__XSERVERNAME__', 'Xorg') +conf_data.set('WITH_VGAHW', build_vgahw) +conf_data.set('CSRG_BASED', csrg_based) +conf_data.set('PCCONS_SUPPORT', supports_pccons) +conf_data.set('PCVT_SUPPORT', supports_pcvt) +conf_data.set('SYSCONS_SUPPORT', supports_syscons) +conf_data.set('WSCONS_SUPPORT', supports_wscons) +conf_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess')) +conf_data.set('XSERVER_PLATFORM_BUS', build_udev) + configure_file(output : 'dix-config.h', configuration : conf_data) |