xserver: Branch 'master' - 7 commits

Adam Jackson ajax at kemper.freedesktop.org
Wed Mar 28 13:56:00 UTC 2018


 include/Makefile.am            |    1 
 include/dix-config.h.in        |    6 -
 include/meson.build            |   64 +++++++++++
 include/xorg-server.h.in       |    9 -
 include/xorg-server.h.meson.in |  222 +++++++++++++++++++++++++++++++++++++++++
 meson.build                    |   30 +++--
 meson_options.txt              |    2 
 7 files changed, 303 insertions(+), 31 deletions(-)

New commits:
commit 4303deae78c4e2a60856be87bf87cd1643c268f5
Author: Thierry Reding <treding at nvidia.com>
Date:   Wed Mar 28 14:04:38 2018 +0200

    meson: Properly extract ABI versions for xorg-server.pc
    
    The newline in the middle of the awk expression confuses Meson and
    causes it to pass only the string before the newline to awk, which will
    subsequently fail because it encounters an unterminated string.
    
    One fix would be to escape the newlines ('\\n'), but that causes the
    newline to end up in the pkg-config file and separate the ABI version
    lines by blank lines.
    
    Instead, simply drop the newlines to make the generated pkg-config file
    look more like the one generated as part of the autotools-based build.
    
    Signed-off-by: Thierry Reding <treding at nvidia.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>

diff --git a/meson.build b/meson.build
index 5feb8338e..9b8da6764 100644
--- a/meson.build
+++ b/meson.build
@@ -602,25 +602,25 @@ if build_xorg
 
     sdkconfig.set('abi_ansic',
         run_command(awk, '-F', '[(,)]',
-                    '/^#define ABI_ANSIC.*SET/ { printf "%d.%d\n", $2, $3 }',
+                    '/^#define ABI_ANSIC.*SET/ { printf "%d.%d", $2, $3 }',
                     files('hw/xfree86/common/xf86Module.h')
         ).stdout()
     )
     sdkconfig.set('abi_videodrv',
         run_command(awk, '-F', '[(,)]',
-                    '/^#define ABI_VIDEODRV.*SET/ { printf "%d.%d\n", $2, $3 }',
+                    '/^#define ABI_VIDEODRV.*SET/ { printf "%d.%d", $2, $3 }',
                     files('hw/xfree86/common/xf86Module.h')
         ).stdout()
     )
     sdkconfig.set('abi_xinput',
         run_command(awk, '-F', '[(,)]',
-                    '/^#define ABI_XINPUT.*SET/ { printf "%d.%d\n", $2, $3 }',
+                    '/^#define ABI_XINPUT.*SET/ { printf "%d.%d", $2, $3 }',
                     files('hw/xfree86/common/xf86Module.h')
         ).stdout()
     )
     sdkconfig.set('abi_extension',
         run_command(awk, '-F', '[(,)]',
-                    '/^#define ABI_EXTENSION.*SET/ { printf "%d.%d\n", $2, $3 }',
+                    '/^#define ABI_EXTENSION.*SET/ { printf "%d.%d", $2, $3 }',
                     files('hw/xfree86/common/xf86Module.h')
         ).stdout()
     )
commit 465b38cadd573ce50eca959f4b56bf4a6a638d91
Author: Thierry Reding <treding at nvidia.com>
Date:   Wed Mar 28 14:04:37 2018 +0200

    meson: Fix generation of xorg-server.pc
    
    Meson stores relative paths for includedir, libdir and friends. These
    have to be concatenated with the ${prefix} or ${exec_prefix} variables
    to create a working pkg-config file.
    
    While at it, set a default value for the module_dir option so that it
    points to the same location as used in the autotools-based build.
    
    Signed-off-by: Thierry Reding <treding at nvidia.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>

diff --git a/meson.build b/meson.build
index 900176e41..5feb8338e 100644
--- a/meson.build
+++ b/meson.build
@@ -592,13 +592,13 @@ if build_xorg
     awk = find_program('awk')
 
     sdkconfig.set('prefix', get_option('prefix'))
-    sdkconfig.set('exec_prefix', get_option('prefix'))
-    sdkconfig.set('libdir', get_option('libdir'))
-    sdkconfig.set('includedir', get_option('includedir'))
-    sdkconfig.set('datarootdir', get_option('datadir'))
-    sdkconfig.set('moduledir', get_option('module_dir'))
-    sdkconfig.set('sdkdir', join_paths(get_option('includedir'), 'include'))
-    sdkconfig.set('sysconfigdir', join_paths(get_option('datadir'), 'X11/xorg.conf.d'))
+    sdkconfig.set('exec_prefix', '${prefix}')
+    sdkconfig.set('libdir', join_paths('${exec_prefix}', get_option('libdir')))
+    sdkconfig.set('includedir', join_paths('${prefix}', get_option('includedir')))
+    sdkconfig.set('datarootdir', join_paths('${prefix}', get_option('datadir')))
+    sdkconfig.set('moduledir', join_paths('${exec_prefix}', get_option('module_dir')))
+    sdkconfig.set('sdkdir', join_paths('${prefix}', get_option('includedir'), 'xorg'))
+    sdkconfig.set('sysconfigdir', join_paths('${datarootdir}', 'X11/xorg.conf.d'))
 
     sdkconfig.set('abi_ansic',
         run_command(awk, '-F', '[(,)]',
diff --git a/meson_options.txt b/meson_options.txt
index ce1ae80bd..5c7be0e26 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -19,7 +19,7 @@ option('builder_addr', type: 'string', description: 'Builder address', value: 'x
 option('builder_string', type: 'string', description: 'Additional builder string')
 
 option('log_dir', type: 'string')
-option('module_dir', type: 'string',
+option('module_dir', type: 'string', value: 'xorg/modules',
        description: 'X.Org modules directory')
 option('default_font_path', type: 'string')
 
commit d905e3330fd4f9b15a0277b22d608705787cb8bc
Author: Thierry Reding <treding at nvidia.com>
Date:   Wed Mar 28 14:04:36 2018 +0200

    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 at nvidia.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>

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)
 
commit 0babe78ed5afec8a06a517346f39b5ebd003773c
Author: Thierry Reding <treding at nvidia.com>
Date:   Wed Mar 28 14:04:35 2018 +0200

    meson: Generate xorg-server.h
    
    Some drivers (such as xf86-input-libinput) require the xorg-server.h to
    build. Generate it and install it so that it can be used by users.
    
    Signed-off-by: Thierry Reding <treding at nvidia.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>

diff --git a/include/Makefile.am b/include/Makefile.am
index afd6db2cf..0ce7faa6e 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -79,4 +79,5 @@ EXTRA_DIST = 	\
 	swapreq.h \
 	systemd-logind.h \
         vidmodestr.h \
+	xorg-server.h.meson.in \
 	xsha1.h
diff --git a/include/meson.build b/include/meson.build
index 4a2798514..0e8465e82 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -216,7 +216,10 @@ conf_data.set_quoted('BUILDERSTRING', get_option('builder_string'))
 configure_file(output : 'dix-config.h',
                configuration : conf_data)
 
-
+configure_file(output : 'xorg-server.h',
+               input : 'xorg-server.h.meson.in',
+               configuration : conf_data,
+               install_dir: xorgsdkdir)
 
 version_data = configuration_data()
 version_data.set('VENDOR_RELEASE', '@0@'.format(release))
diff --git a/include/xorg-server.h.meson.in b/include/xorg-server.h.meson.in
new file mode 100644
index 000000000..093801cad
--- /dev/null
+++ b/include/xorg-server.h.meson.in
@@ -0,0 +1,222 @@
+/* xorg-server.h.in						-*- c -*-
+ *
+ * This file is the template file for the xorg-server.h file which gets
+ * installed as part of the SDK.  The #defines in this file overlap
+ * with those from config.h, but only for those options that we want
+ * to export to external modules.  Boilerplate autotool #defines such
+ * as HAVE_STUFF and PACKAGE_NAME is kept in config.h
+ *
+ * It is still possible to update config.h.in using autoheader, since
+ * autoheader only creates a .h.in file for the first
+ * AM_CONFIG_HEADER() line, and thus does not overwrite this file.
+ *
+ * However, it should be kept in sync with this file.
+ */
+
+#ifndef _XORG_SERVER_H_
+#define _XORG_SERVER_H_
+
+#ifdef HAVE_XORG_CONFIG_H
+#error Include xorg-config.h when building the X server
+#endif
+
+/* Support BigRequests extension */
+#mesondefine BIGREQS
+
+/* Default font path */
+#mesondefine COMPILEDDEFAULTFONTPATH
+
+/* Support Composite Extension */
+#mesondefine COMPOSITE
+
+/* Build DPMS extension */
+#mesondefine DPMSExtension
+
+/* Build DRI3 extension */
+#mesondefine DRI3
+
+/* Build GLX extension */
+#mesondefine GLXEXT
+
+/* Support XDM-AUTH*-1 */
+#mesondefine HASXDMAUTH
+
+/* Support SHM */
+#mesondefine HAS_SHM
+
+/* Define to 1 if you have the `reallocarray' function. */
+#mesondefine HAVE_REALLOCARRAY
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#mesondefine HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strcasestr' function. */
+#mesondefine HAVE_STRCASESTR
+
+/* Define to 1 if you have the `strlcat' function. */
+#mesondefine HAVE_STRLCAT
+
+/* Define to 1 if you have the `strlcpy' function. */
+#mesondefine HAVE_STRLCPY
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#mesondefine HAVE_STRNCASECMP
+
+/* Define to 1 if you have the `strndup' function. */
+#mesondefine HAVE_STRNDUP
+
+/* Support IPv6 for TCP connections */
+#mesondefine IPv6
+
+/* Support MIT-SHM Extension */
+#mesondefine MITSHM
+
+/* Internal define for Xinerama */
+#mesondefine PANORAMIX
+
+/* Support Present extension */
+#mesondefine PRESENT
+
+/* Support RANDR extension */
+#mesondefine RANDR
+
+/* Support RENDER extension */
+#mesondefine RENDER
+
+/* Support X resource extension */
+#mesondefine RES
+
+/* Support MIT-SCREEN-SAVER extension */
+#mesondefine SCREENSAVER
+
+/* Support SHAPE extension */
+#mesondefine SHAPE
+
+/* Define to 1 on systems derived from System V Release 4 */
+#mesondefine SVR4
+
+/* Support TCP socket connections */
+#mesondefine TCPCONN
+
+/* Support UNIX socket connections */
+#mesondefine UNIXCONN
+
+/* Support XCMisc extension */
+#mesondefine XCMISC
+
+/* Support Xdmcp */
+#mesondefine XDMCP
+
+/* Build XFree86 BigFont extension */
+#mesondefine XF86BIGFONT
+
+/* Support XFree86 Video Mode extension */
+#mesondefine XF86VIDMODE
+
+/* Build XDGA support */
+#mesondefine XFreeXDGA
+
+/* Support Xinerama extension */
+#mesondefine XINERAMA
+
+/* Support X Input extension */
+#mesondefine XINPUT
+
+/* XKB default rules */
+#mesondefine XKB_DFLT_RULES
+
+/* Build DRI extension */
+#mesondefine XF86DRI
+
+/* Build DRI2 extension */
+#mesondefine DRI2
+
+/* Build Xorg server */
+#mesondefine XORGSERVER
+
+/* Current Xorg version */
+#mesondefine XORG_VERSION_CURRENT
+
+/* Build Xv Extension */
+#mesondefine XvExtension
+
+/* Build XvMC Extension */
+#mesondefine XvMCExtension
+
+/* Support XSync extension */
+#mesondefine XSYNC
+
+/* Support XTest extension */
+#mesondefine XTEST
+
+/* Support Xv Extension */
+#mesondefine XV
+
+/* Vendor name */
+#mesondefine XVENDORNAME
+
+/* BSD-compliant source */
+#mesondefine _BSD_SOURCE
+
+/* POSIX-compliant source */
+#mesondefine _POSIX_SOURCE
+
+/* X/Open-compliant source */
+#mesondefine _XOPEN_SOURCE
+
+/* Vendor web address for support */
+#mesondefine __VENDORDWEBSUPPORT__
+
+/* Location of configuration file */
+#mesondefine XCONFIGFILE
+
+/* Name of X server */
+#mesondefine __XSERVERNAME__
+
+/* Building vgahw module */
+#mesondefine WITH_VGAHW
+
+/* 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
+
+/* Loadable XFree86 server awesomeness */
+#define XFree86LOADER
+
+/* Use libpciaccess */
+#mesondefine XSERVER_LIBPCIACCESS
+
+/* X Access Control Extension */
+#mesondefine XACE
+
+/* Have X server platform bus support */
+#mesondefine XSERVER_PLATFORM_BUS
+
+#ifdef _LP64
+#define _XSERVER64 1
+#endif
+
+/* Have support for X shared memory fence library (xshmfence) */
+#mesondefine HAVE_XSHMFENCE
+
+/* Use XTrans FD passing support */
+#mesondefine XTRANS_SEND_FDS
+
+/* Ask fontsproto to make font path element names const */
+#define FONT_PATH_ELEMENT_NAME_CONST    1
+
+/* byte order */
+#mesondefine X_BYTE_ORDER
+
+#endif /* _XORG_SERVER_H_ */
commit b04ff31b9d471822fe96ed63eda93fc4cd8c22d0
Author: Thierry Reding <treding at nvidia.com>
Date:   Wed Mar 28 14:04:34 2018 +0200

    dix: Remove unused definitions from dix-config.h.in
    
    There is no code around that will ever define values for the
    WORKING_UNALIGNED_INT or XORG_RELEASE symbols, so they will always end
    up commented out and are therefore completely useless.
    
    Signed-off-by: Thierry Reding <treding at nvidia.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>

diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 69fc5e3fb..c64321ef1 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -310,9 +310,6 @@
 /* Support UNIX socket connections */
 #undef UNIXCONN
 
-/* unaligned word accesses behave as expected */
-#undef WORKING_UNALIGNED_INT
-
 /* Build X string registry */
 #undef XREGISTRY
 
@@ -346,9 +343,6 @@
 /* Support Xinerama extension */
 #undef XINERAMA
 
-/* Vendor release */
-#undef XORG_RELEASE
-
 /* Current Xorg version */
 #undef XORG_VERSION_CURRENT
 
commit c62a8b60b9a07092ebebf9aeb67a0c39c583aabe
Author: Thierry Reding <treding at nvidia.com>
Date:   Wed Mar 28 14:04:33 2018 +0200

    xorg: Remove unused definitions from xorg-server.h.in
    
    There is no code around that will ever define values for the XLOADABLE,
    WORKING_UNALIGNED_INT or XORG_RELEASE symbols, so they will always end
    up commented out and are therefore completely useless.
    
    Signed-off-by: Thierry Reding <treding at nvidia.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>

diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
index aae2faed6..e2a0ba0d0 100644
--- a/include/xorg-server.h.in
+++ b/include/xorg-server.h.in
@@ -101,9 +101,6 @@
 /* Support UNIX socket connections */
 #undef UNIXCONN
 
-/* unaligned word accesses behave as expected */
-#undef WORKING_UNALIGNED_INT
-
 /* Support XCMisc extension */
 #undef XCMISC
 
@@ -128,9 +125,6 @@
 /* XKB default rules */
 #undef XKB_DFLT_RULES
 
-/* Support loadable input and output drivers */
-#undef XLOADABLE
-
 /* Build DRI extension */
 #undef XF86DRI
 
@@ -140,9 +134,6 @@
 /* Build Xorg server */
 #undef XORGSERVER
 
-/* Vendor release */
-#undef XORG_RELEASE
-
 /* Current Xorg version */
 #undef XORG_VERSION_CURRENT
 
commit 66402fcd8280b393d3992121c0bcff9c646c97ed
Author: Thierry Reding <treding at nvidia.com>
Date:   Wed Mar 28 14:04:32 2018 +0200

    meson: Fix build if Xdmcp is missing
    
    Xdmcp is an optional dependency, so make sure the build succeeds if it
    is missing.
    
    Signed-off-by: Thierry Reding <treding at nvidia.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>

diff --git a/include/meson.build b/include/meson.build
index c64af59f5..4a2798514 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -91,7 +91,7 @@ conf_data.set_quoted('COMPILEDDEFAULTFONTPATH', default_font_path)
 
 conf_data.set('XORG_VERSION_CURRENT', release)
 
-conf_data.set('HASXDMAUTH', get_option('xdm-auth-1'))
+conf_data.set('HASXDMAUTH', has_xdm_auth)
 conf_data.set('SECURE_RPC', get_option('secure-rpc'))
 
 conf_data.set('HAVE_DLFCN_H', cc.has_header('dlfcn.h'))
@@ -182,7 +182,7 @@ 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('XDMCP', xdmcp_dep.found())
 conf_data.set('XF86BIGFONT', build_xf86bigfont)
 conf_data.set('XF86DRI', build_dri1)
 conf_data.set('XF86VIDMODE', build_xf86vidmode)
diff --git a/meson.build b/meson.build
index b39c47e81..900176e41 100644
--- a/meson.build
+++ b/meson.build
@@ -288,11 +288,17 @@ endif
 # XXX: Add more sha1 options, because Linux is about choice
 sha1_dep = nettle_dep
 
-xdmcp_dep = []
+xdmcp_dep = dependency('', required : false)
 if get_option('xdmcp')
     xdmcp_dep = dependency('xdmcp')
 endif
 
+has_xdm_auth = get_option('xdm-auth-1')
+
+if not xdmcp_dep.found()
+  has_xdm_auth = false
+endif
+
 build_glx = get_option('glx')
 
 libdrm_dep = dependency('libdrm', version: '>= 2.4.89', required: false)


More information about the xorg-commit mailing list